summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_awaymsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_awaymsg.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_awaymsg.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp
index adba1130a3..d98489d9cc 100644
--- a/plugins/Clist_modern/src/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/src/modern_awaymsg.cpp
@@ -76,7 +76,7 @@ static MCONTACT amGetCurrentChain()
*/
static void amThreadProc(void *)
{
- thread_catcher lck(g_hAwayMsgThread);
+ Netlib_Logf(NULL, "amThreadProc thread start");
ClcCacheEntry dnce;
memset(&dnce, 0, sizeof(dnce));
@@ -88,7 +88,7 @@ static void amThreadProc(void *)
if ((time - amRequestTick) < AMASKPERIOD) {
SleepEx(AMASKPERIOD - (time - amRequestTick) + 10, TRUE);
if (MirandaExiting())
- return;
+ goto LBL_Exit;
}
CListSettings_FreeCacheItemData(&dnce);
dnce.hContact = hContact;
@@ -120,13 +120,17 @@ static void amThreadProc(void *)
}
else break;
if (MirandaExiting())
- return;
+ goto LBL_Exit;
}
WaitForSingleObjectEx(hamProcessEvent, INFINITE, TRUE);
ResetEvent(hamProcessEvent);
if (MirandaExiting())
break;
}
+
+LBL_Exit:
+ g_hAwayMsgThread = NULL;
+ Netlib_Logf(NULL, "amThreadProc thread end");
}
BOOL amWakeThread()