diff options
Diffstat (limited to 'protocols/CurrencyRates/src')
-rw-r--r-- | protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp | 2 | ||||
-rw-r--r-- | protocols/CurrencyRates/src/Forex.cpp | 18 | ||||
-rw-r--r-- | protocols/CurrencyRates/src/Options.cpp | 2 | ||||
-rw-r--r-- | protocols/CurrencyRates/src/stdafx.cxx | 2 |
4 files changed, 5 insertions, 19 deletions
diff --git a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp index 3b11bf4700..c4cfc69800 100644 --- a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp +++ b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp @@ -375,7 +375,7 @@ void log_to_history(const ICurrencyRatesProvider *pProvider, MCONTACT hContact, DBEVENTINFO dbei = {}; dbei.szModule = MODULENAME; - dbei.timestamp = static_cast<uint32_t>(nTime); + dbei.iTimestamp = static_cast<uint32_t>(nTime); dbei.flags = DBEF_READ | DBEF_UTF; dbei.eventType = EVENTTYPE_MESSAGE; dbei.cbBlob = (int)::mir_strlen(psz) + 1; diff --git a/protocols/CurrencyRates/src/Forex.cpp b/protocols/CurrencyRates/src/Forex.cpp index 45477a453f..1f2e72b2ff 100644 --- a/protocols/CurrencyRates/src/Forex.cpp +++ b/protocols/CurrencyRates/src/Forex.cpp @@ -22,9 +22,6 @@ HGENMENU g_hMenuChart = nullptr; #endif HGENMENU g_hMenuRefresh = nullptr, g_hMenuRoot = nullptr; -typedef std::vector<HANDLE> THandles; -static THandles g_ahThreads; - static HGENMENU g_hEnableDisableMenu; static HANDLE g_hTBButton; @@ -172,7 +169,7 @@ int CurrencyRates_OnToolbarLoaded(WPARAM, LPARAM) static void WorkingThread(void *pParam) { - ICurrencyRatesProvider *pProvider = reinterpret_cast<ICurrencyRatesProvider*>(pParam); + auto *pProvider = (ICurrencyRatesProvider *)pParam; assert(pProvider); if (pProvider) @@ -196,7 +193,7 @@ int CurrencyRatesEventFunc_OnModulesLoaded(WPARAM, LPARAM) ::ResetEvent(g_hEventWorkThreadStop); - g_ahThreads.push_back(mir_forkthread(WorkingThread, g_pCurrentProvider)); + mir_forkthread(WorkingThread, g_pCurrentProvider); return 0; } @@ -215,15 +212,6 @@ INT_PTR CurrencyRateProtoFunc_GetStatus(WPARAM, LPARAM) return g_bAutoUpdate ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; } -void WaitForWorkingThreads() -{ - size_t cThreads = g_ahThreads.size(); - if (cThreads > 0) { - HANDLE* paHandles = &*(g_ahThreads.begin()); - ::WaitForMultipleObjects((uint32_t)cThreads, paHandles, TRUE, INFINITE); - } -} - int CurrencyRatesEventFunc_PreShutdown(WPARAM, LPARAM) { ::SetEvent(g_hEventWorkThreadStop); @@ -333,8 +321,6 @@ int CMPlugin::Load(void) int CMPlugin::Unload(void) { - WaitForWorkingThreads(); - ClearProviders(); ::CloseHandle(g_hEventWorkThreadStop); return 0; diff --git a/protocols/CurrencyRates/src/Options.cpp b/protocols/CurrencyRates/src/Options.cpp index 785102f0b9..07d2837034 100644 --- a/protocols/CurrencyRates/src/Options.cpp +++ b/protocols/CurrencyRates/src/Options.cpp @@ -1,5 +1,5 @@ /* -Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org) +Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/protocols/CurrencyRates/src/stdafx.cxx b/protocols/CurrencyRates/src/stdafx.cxx index 87b7477097..72e87c2758 100644 --- a/protocols/CurrencyRates/src/stdafx.cxx +++ b/protocols/CurrencyRates/src/stdafx.cxx @@ -1,5 +1,5 @@ /*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
|