From 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 May 2018 16:02:14 +0200 Subject: mir_forkThread - stronger typizatioin for thread function parameter --- protocols/MRA/src/Mra_functions.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'protocols/MRA/src/Mra_functions.cpp') 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(FakeThread, ack); return 0; } -- cgit v1.2.3