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 --- plugins/SecureIM/src/dbevent.cpp | 2 +- plugins/SecureIM/src/main.cpp | 2 +- plugins/SecureIM/src/svcs_proto.cpp | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/SecureIM/src') diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp index 495bc324e2..a072dd108c 100644 --- a/plugins/SecureIM/src/dbevent.cpp +++ b/plugins/SecureIM/src/dbevent.cpp @@ -5,7 +5,7 @@ void HistoryLog(MCONTACT hContact, LPCSTR szText) DBEVENTINFO dbei = {}; dbei.szModule = GetContactProto(hContact); dbei.flags = DBEF_SENT | DBEF_READ; - dbei.timestamp = time(nullptr); + dbei.timestamp = time(0); dbei.eventType = EVENTTYPE_MESSAGE; dbei.cbBlob = (int)mir_strlen(szText) + 1; dbei.pBlob = (PBYTE)szText; diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 4cfa2d69b2..fd9dbd2f17 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -105,7 +105,7 @@ static int onModulesLoaded(WPARAM, LPARAM) } if (!rsa_4096) - mir_forkthread(sttGenerateRSA, nullptr); + mir_forkthread(sttGenerateRSA); mir_exp->rsa_set_timeout(db_get_w(0, MODULENAME, "ket", 10)); diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index cc763dbb25..d2405a10d0 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -18,10 +18,8 @@ int getSecureSig(LPCSTR szMsg, LPSTR *szPlainMsg = nullptr) ///////////////////////////////////////////////////////////////////////////////////////// -static void sttFakeAck(LPVOID param) +static void sttFakeAck(TFakeAckParams *tParam) { - TFakeAckParams *tParam = (TFakeAckParams*)param; - Sleep(100); if (tParam->msg == nullptr) SendBroadcast(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)tParam->id, 0); @@ -33,13 +31,13 @@ static void sttFakeAck(LPVOID param) int returnNoError(MCONTACT hContact) { - mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 777, nullptr)); + mir_forkThread(sttFakeAck, new TFakeAckParams(hContact, 777, nullptr)); return 777; } int returnError(MCONTACT hContact, LPCSTR err) { - mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 666, err)); + mir_forkThread(sttFakeAck, new TFakeAckParams(hContact, 666, err)); return 666; } -- cgit v1.2.3