summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_proto.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-07-30 11:48:24 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-07-30 11:48:24 +0000
commit6adf63a8d746ad357a3bbfedebd2281080241f19 (patch)
tree80a7972d1bfa83d25e36a985e60681a8b42ed1fa /protocols/SkypeWeb/src/skype_proto.cpp
parent1271802f514d41e8e06df7714d1f1e4a430b417b (diff)
SkypeWeb: refactoring
git-svn-id: http://svn.miranda-ng.org/main/trunk@14758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 90af7ae638..14cf94dffd 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -40,10 +40,8 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) :
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeT(m_tszAvatarFolder.c_str());
- db_set_resident(m_szModuleName, "LastAuthRequestTime");
-
//hooks
- m_hCallHook = CreateHookableEvent(MODULE "/IncomingCall");
+ if (!m_hCallEvent) m_hCallEvent = CreateHookableEvent(MODULE "/IncomingCall");
//sounds
SkinAddNewSoundEx("skype_inc_call", "SkypeWeb", LPGEN("Incoming call sound"));
@@ -60,16 +58,11 @@ CSkypeProto::~CSkypeProto()
delete requestQueue;
UnInitNetwork();
+ UninitPopups();
CloseHandle(m_hTrouterEvent); m_hTrouterEvent = NULL;
- if (m_hCallHook)
- DestroyHookableEvent(m_hCallHook);
-
- for (int i = 0; i < m_PopupClasses.getCount(); i++)
- {
- Popup_UnregisterClass(m_PopupClasses[i]);
- }
+ if (m_hCallEvent && Accounts.getCount() == 0) DestroyHookableEvent(m_hCallEvent);
SkypeUnsetTimer(this);
}
@@ -290,5 +283,6 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM)
debugLogA(__FUNCTION__);
isTerminated = true;
requestQueue->Stop();
+ ShutdownConnections();
return 0;
}