diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 14:28:21 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-11 14:28:21 +0000 |
commit | d978a71c913c7213158d7014e43fe6535c60dcc9 (patch) | |
tree | 685053df83a3eca4ff36c49547d891e7936cd114 /plugins/CmdLine/src/mimcmd_handlers.cpp | |
parent | 7b2f41b2571dbc15abb77b5462b14473eabafcb2 (diff) |
minus CreateThread
git-svn-id: http://svn.miranda-ng.org/main/trunk@13533 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CmdLine/src/mimcmd_handlers.cpp')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 0d1fa34368..97266a83b4 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1423,15 +1423,13 @@ int ContactMatchSearch(MCONTACT hContact, char *contact, char *id, char *account return matches;
}
-DWORD WINAPI OpenMessageWindowThread(void *data)
+void __cdecl OpenMessageWindowThread(void *data)
{
MCONTACT hContact = (MCONTACT) data;
if (hContact)
{
CallServiceSync(MS_MSG_SENDMESSAGET, hContact, 0);
}
-
- return 0;
}
@@ -1493,10 +1491,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r char *contact = GetContactName(hContact, protocol);
char *id = GetContactID(hContact, protocol);
if (ContactMatchSearch(hContact, contact, id, protocol, &argv[3], argc - 3))
- {
- DWORD threadID;
- HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, (void*)hContact, NULL, &threadID);
- }
+ HANDLE thread = mir_forkthread(OpenMessageWindowThread, (void*)hContact);
free(contact);
free(id);
@@ -1508,10 +1503,8 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
MEVENT hUnreadEvent = db_event_firstUnread(hContact);
- if (hUnreadEvent != NULL) {
- DWORD threadID;
- HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, (void*)hContact, NULL, &threadID);
- }
+ if (hUnreadEvent != NULL)
+ HANDLE thread = mir_forkthread(OpenMessageWindowThread, (void*)hContact);
}
}
else HandleWrongParametersCount(command, reply);
|