From b94dc989d9eba4bcbf255421b84d1803cbfd0bc1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 May 2013 15:34:17 +0000 Subject: minor fix for going offline git-svn-id: http://svn.miranda-ng.org/main/trunk@4622 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_account.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'protocols/Skype') diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp index d79ee7e973..b8832b2266 100644 --- a/protocols/Skype/src/skype_account.cpp +++ b/protocols/Skype/src/skype_account.cpp @@ -274,11 +274,12 @@ void CSkypeProto::OnLoggedOut(CAccount::LOGOUTREASON reason) { this->Log(L"Failed to login: %s", CSkypeProto::LogoutReasons[reason]); - this->SetStatus(ID_STATUS_OFFLINE); - this->SendBroadcast( - ACKTYPE_LOGIN, ACKRESULT_FAILED, - NULL, CSkypeProto::SkypeToMirandaLoginError(reason)); + if (this->m_iStatus == ID_STATUS_CONNECTING) + this->SendBroadcast( + ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, + CSkypeProto::SkypeToMirandaLoginError(reason)); + this->SetStatus(ID_STATUS_OFFLINE); this->ShowNotification(CSkypeProto::LogoutReasons[reason]); if (this->rememberPassword && reason == CAccount::INCORRECT_PASSWORD) @@ -309,13 +310,9 @@ void CSkypeProto::OnAccountChanged(int prop) if (loginStatus == CAccount::LOGGED_OUT) { CAccount::LOGOUTREASON reason; - if ( !this->account->GetPropLogoutreason(reason)) - break; - - if (reason != CAccount::LOGOUT_CALLED) - { - this->OnLoggedOut(reason); - } + if (this->account->GetPropLogoutreason(reason)) + if (reason != CAccount::LOGOUT_CALLED) + this->OnLoggedOut(reason); } break; -- cgit v1.2.3