summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src/tlen_voice.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-11-14 14:44:56 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-11-14 14:44:56 +0000
commitd1de0e3cba9195d28126e102679d6ed1a7f72d0c (patch)
treeec30d8fd32cea0c13dd2d973b26442d8a9af77f7 /protocols/Tlen/src/tlen_voice.cpp
parent29bd9ad7abfe2d9f3e55ece719ac48534b08ea62 (diff)
Tlen:
- Fix for GetContactDisplayName git-svn-id: http://svn.miranda-ng.org/main/trunk@15722 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen/src/tlen_voice.cpp')
-rw-r--r--protocols/Tlen/src/tlen_voice.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp
index f35a51d4fa..5548662415 100644
--- a/protocols/Tlen/src/tlen_voice.cpp
+++ b/protocols/Tlen/src/tlen_voice.cpp
@@ -172,7 +172,7 @@ static int TlenVoiceRecordingStart(TLEN_VOICE_CONTROL *control)
control->waveHeadersPos = 0;
control->waveHeadersNum = 2;
- control->hThread = mir_forkthread(TlenVoiceRecordingThreadProc, (void*)control);
+ control->hThread = mir_forkthread(TlenVoiceRecordingThreadProc, control);
SetThreadPriority(control->hThread, THREAD_PRIORITY_ABOVE_NORMAL);
@@ -287,8 +287,9 @@ static void TlenVoiceCrypt(char *buffer, int len)
}
}
-void __cdecl TlenVoiceReceiveThread(TLEN_FILE_TRANSFER *ft)
+static void __cdecl TlenVoiceReceiveThread(void *arg)
{
+ TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *)arg;
ft->proto->debugLogA("Thread started: type=file_receive server='%s' port='%d'", ft->hostName, ft->wPort);
NETLIBOPENCONNECTION nloc = { sizeof(nloc) };
@@ -508,8 +509,9 @@ static void TlenVoiceReceiveParse(TLEN_FILE_TRANSFER *ft)
}
-void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft)
+static void __cdecl TlenVoiceSendingThread(void *arg)
{
+ TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *)arg;
char *nick;
ft->proto->debugLogA("Thread started: type=voice_send");
@@ -914,13 +916,13 @@ int TlenVoiceStart(TLEN_FILE_TRANSFER *ft, int mode)
ft->proto->debugLogA("starting voice %d", mode);
if (mode == 0) {
- mir_forkthread((pThreadFunc)TlenVoiceReceiveThread, ft);
+ mir_forkthread(TlenVoiceReceiveThread, ft);
}
else if (mode == 1) {
- mir_forkthread((pThreadFunc)TlenVoiceSendingThread, ft);
+ mir_forkthread(TlenVoiceSendingThread, ft);
}
else {
- mir_forkthread((pThreadFunc)TlenVoiceDlgThread, ft);
+ mir_forkthread(TlenVoiceDlgThread, ft);
}
return 0;
}
@@ -934,7 +936,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id)
mir_snprintf(jid, "%s@%s", id, dbv.pszVal);
db_free(&dbv);
if ((hContact = TlenHContactFromJID(proto, jid)) != NULL)
- return mir_strdup((char *)pcli->pfnGetContactDisplayName(hContact, 0));
+ return mir_t2a(pcli->pfnGetContactDisplayName(hContact, 0));
}
return mir_strdup(id);
}
@@ -1050,7 +1052,7 @@ int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from)
ACCEPTDIALOGDATA *data = (ACCEPTDIALOGDATA *)mir_alloc(sizeof(ACCEPTDIALOGDATA));
data->proto = proto;
data->item = item;
- mir_forkthread((pThreadFunc)TlenVoiceAcceptDlgThread, data);
+ mir_forkthread(TlenVoiceAcceptDlgThread, data);
}
else if (proto->isOnline) {
item->ft = TlenFileCreateFT(proto, from);