summaryrefslogtreecommitdiff
path: root/plugins/SecureIM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
commit3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch)
tree412a28ef6a572efc7039df1c363bf47a3dec4b19 /plugins/SecureIM
parent9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff)
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'plugins/SecureIM')
-rw-r--r--plugins/SecureIM/src/dbevent.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp2
-rw-r--r--plugins/SecureIM/src/svcs_proto.cpp8
3 files changed, 5 insertions, 7 deletions
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<TFakeAckParams>(sttFakeAck, new TFakeAckParams(hContact, 777, nullptr));
return 777;
}
int returnError(MCONTACT hContact, LPCSTR err)
{
- mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 666, err));
+ mir_forkThread<TFakeAckParams>(sttFakeAck, new TFakeAckParams(hContact, 666, err));
return 666;
}