summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src/KeepStatus
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-18 18:33:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-18 18:33:09 +0300
commit3e9e96f6718b13c069138fb40f24f065ac03c6b7 (patch)
treed09301e8d63cf2bc70601fe683992440d4e2e086 /plugins/StatusManager/src/KeepStatus
parentb5de62080a2384e9f66d7bafbf971aa5b4b7c0c1 (diff)
unneeded calls of DestroyServiceFunction() removed
Diffstat (limited to 'plugins/StatusManager/src/KeepStatus')
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
index 1cc209f0c7..01b63728a0 100644
--- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
@@ -32,12 +32,7 @@ struct TimerInfo {
HANDLE hMainThread = 0;
unsigned long mainThreadId = 0;
-HANDLE hKSModuleLoadedHook = NULL,
- hConnectionEvent = NULL,
- hStopRecon = NULL,
- hEnableProto = NULL,
- hIsProtoEnabled = NULL,
- hAnnounceStat = NULL;
+HANDLE hConnectionEvent = NULL;
static mir_cs GenTimerCS, GenStatusCS, CheckContinueslyCS;
@@ -1219,14 +1214,14 @@ void KeepStatusLoad()
MUUID muidLast = MIID_LAST;
hKSLangpack = GetPluginLangId(muidLast, 0);
- hKSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
CreateHookableEvent(ME_KS_CONNECTIONEVENT);
- hStopRecon = CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
- hEnableProto = CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
- hIsProtoEnabled = CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
- hAnnounceStat = CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
+ CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
+ CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
+ CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
+ CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
mainThreadId = GetCurrentThreadId();
@@ -1237,12 +1232,5 @@ void KeepStatusUnload()
if (hMainThread)
CloseHandle(hMainThread);
- DestroyServiceFunction(hStopRecon);
- DestroyServiceFunction(hEnableProto);
- DestroyServiceFunction(hIsProtoEnabled);
- DestroyServiceFunction(hAnnounceStat);
-
DestroyHookableEvent(hConnectionEvent);
-
- UnhookEvent(hKSModuleLoadedHook);
}