diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-19 22:05:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-19 22:05:57 +0000 |
commit | fb8492db75b7a3e4faaf5ab297c3046747b231a9 (patch) | |
tree | 362cce418770bacf40a977a6a9659517a46892d0 /plugins/NewsAggregator | |
parent | 25c307a140104c3b09fecbbf2f452368090a45d0 (diff) |
fix for hangup on exit
git-svn-id: http://svn.miranda-ng.org/main/trunk@11026 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index c9f4fea07b..1e353f7d33 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -29,14 +29,6 @@ void SetContactStatus(MCONTACT hContact, int nNewStatus) db_set_w(hContact, MODULE, "Status", nNewStatus);
}
-static void __cdecl WorkingThread(void* param)
-{
- int nStatus = (int)param;
-
- for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE))
- SetContactStatus(hContact, nStatus);
-}
-
int OnFoldersChanged(WPARAM, LPARAM)
{
FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, _T(""));
@@ -118,7 +110,10 @@ INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM) int nOldStatus = g_nStatus;
if(nStatus != g_nStatus) {
g_nStatus = nStatus;
- mir_forkthread(WorkingThread, (void *)g_nStatus);
+
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE))
+ SetContactStatus(hContact, nStatus);
+
ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus);
}
}
|