diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-16 12:27:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-16 12:27:24 +0300 |
commit | 7ac239793b33cfc1e7b04a05080e6d8382a5a8ad (patch) | |
tree | f7bc72fed01b86fde684548fe1bfe5669e3e5d47 /plugins/VoiceService/src/hooks.cpp | |
parent | 7bbe8d0d988250da3402dca1f15e857ed41ed994 (diff) |
VoiceService: fix for an occasional crash on exit
Diffstat (limited to 'plugins/VoiceService/src/hooks.cpp')
-rw-r--r-- | plugins/VoiceService/src/hooks.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/VoiceService/src/hooks.cpp b/plugins/VoiceService/src/hooks.cpp index b9c41336d6..52a8eafbda 100644 --- a/plugins/VoiceService/src/hooks.cpp +++ b/plugins/VoiceService/src/hooks.cpp @@ -76,8 +76,6 @@ static INT_PTR CMAnswer(WPARAM wParam, LPARAM lParam); static INT_PTR CMHold(WPARAM wParam, LPARAM lParam); static INT_PTR CMDrop(WPARAM wParam, LPARAM lParam); -static VOID CALLBACK ClearOldVoiceCalls(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); - class CallingMethod { public: @@ -417,7 +415,7 @@ VoiceCall* FindVoiceCall(MCONTACT hContact) return nullptr; } -static VOID CALLBACK ClearOldVoiceCalls(HWND, UINT, UINT_PTR, DWORD) +void Timers::ClearEvents(CTimer*) { DWORD now = GetTickCount(); bool refresh = false; @@ -692,7 +690,7 @@ int ModulesLoaded(WPARAM, LPARAM) g_plugin.addSound(it.szName, LPGENW("Voice Calls"), it.wszDescr); g_plugin.addSound("voice_dialpad", LPGENW("Voice Calls"), LPGENW("Dialpad press")); - SetTimer(NULL, 0, 1000, ClearOldVoiceCalls); + g_timers.m_timer.Start(1000); // Accounts for (auto *pa : Accounts()) @@ -704,6 +702,7 @@ int ModulesLoaded(WPARAM, LPARAM) int PreShutdown(WPARAM, LPARAM) { + g_timers.m_timer.Stop(); DeInitFrames(); DeInitOptions(); return 0; |