diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-03 16:02:14 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-03 16:02:14 +0200 |
commit | 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch) | |
tree | 412a28ef6a572efc7039df1c363bf47a3dec4b19 /protocols/MRA/src/Mra_functions.cpp | |
parent | 9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff) |
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 1b2ec046c2..91dd706532 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -872,14 +872,13 @@ void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode /////////////////////////////////////////////////////////////////////////////////////////
-static void FakeThread(void* param)
+static void __cdecl FakeThread(ACKDATA *ack)
{
Thread_SetName("MRA: ProtoBroadcastAckAsync");
Sleep(100);
- ACKDATA *ack = (ACKDATA*)param;
ProtoBroadcastAck(ack->szModule, ack->hContact, ack->type, ack->result, ack->hProcess, ack->lParam);
- mir_free(param);
+ mir_free(ack);
}
DWORD CMraProto::ProtoBroadcastAckAsync(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
@@ -891,7 +890,7 @@ DWORD CMraProto::ProtoBroadcastAckAsync(MCONTACT hContact, int type, int hResult ack->result = hResult;
ack->hProcess = hProcess;
ack->lParam = lParam;
- mir_forkthread(FakeThread, ack);
+ mir_forkThread<ACKDATA>(FakeThread, ack);
return 0;
}
|