From 1c0ee54dedd808a106ca64edd249598def1c9ed3 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 1 Aug 2015 18:44:27 +0000 Subject: SkypeWeb: More fixes & optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@14783 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_proto.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_proto.cpp') diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 14cf94dffd..037b1a3c66 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -49,7 +49,7 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) : m_hTrouterEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - SkypeSetTimer(this); + SkypeSetTimer(); } CSkypeProto::~CSkypeProto() @@ -64,7 +64,7 @@ CSkypeProto::~CSkypeProto() if (m_hCallEvent && Accounts.getCount() == 0) DestroyHookableEvent(m_hCallEvent); - SkypeUnsetTimer(this); + SkypeUnsetTimer(); } DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT) @@ -203,6 +203,8 @@ int CSkypeProto::SetStatus(int iNewStatus) break; } + mir_cslock lck(m_StatusLock); + debugLogA(__FUNCTION__ ": changing status from %i to %i", m_iStatus, iNewStatus); int old_status = m_iStatus; @@ -212,10 +214,8 @@ int CSkypeProto::SetStatus(int iNewStatus) { // logout isTerminated = true; - if (m_pollingConnection) - CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConnection, 0); - if (m_TrouterConnection) - CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_TrouterConnection, 0); + requestQueue->Stop(); + ShutdownConnections(); if (m_iStatus > ID_STATUS_CONNECTING + 1) { @@ -224,7 +224,7 @@ int CSkypeProto::SetStatus(int iNewStatus) delSetting("endpointId"); delSetting("expires"); } - requestQueue->Stop(); + CloseDialogs(); ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; -- cgit v1.2.3