summaryrefslogtreecommitdiff
path: root/protocols/Skype
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-10 15:34:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-10 15:34:17 +0000
commitb94dc989d9eba4bcbf255421b84d1803cbfd0bc1 (patch)
tree14a10c9fec2509e6f6749c121cbecd7eb6854f33 /protocols/Skype
parent32cc6d62a154d5724c40085f22747df2ee2ff4cb (diff)
minor fix for going offline
git-svn-id: http://svn.miranda-ng.org/main/trunk@4622 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r--protocols/Skype/src/skype_account.cpp19
1 files changed, 8 insertions, 11 deletions
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;