diff options
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.cpp')
-rw-r--r-- | protocols/Skype/src/skype_subclassing.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp index 4f9f7bf2f4..ad3c265749 100644 --- a/protocols/Skype/src/skype_subclassing.cpp +++ b/protocols/Skype/src/skype_subclassing.cpp @@ -26,7 +26,8 @@ CConversation* CSkype::newConversation(int oid) CAccount::CAccount(unsigned int oid, SERootObject* root) : Account(oid, root) { - this->isLoggedOut = true; + this->isLoggedIn = false; + this->isLoggedOut = false; } void CAccount::OnChange(int prop) @@ -36,32 +37,36 @@ void CAccount::OnChange(int prop) CAccount::STATUS loginStatus; this->GetPropStatus(loginStatus); if (loginStatus == CAccount::LOGGED_IN) - this->isLoggedOut = false; + this->isLoggedIn = true; if (loginStatus == CAccount::LOGGED_OUT) { - this->isLoggedOut = true; CAccount::LOGOUTREASON whyLogout; this->GetPropLogoutreason(whyLogout); + this->logoutReason = whyLogout; if (whyLogout != Account::LOGOUT_CALLED) { - printf("%s\n", (const char*)tostring(whyLogout)); + // todo: rewrite!! + strcpy(this->logoutReasonString, (const char*)tostring(whyLogout)); } + this->isLoggedOut = true; }
} - } void CAccount::BlockWhileLoggingIn() { - while (this->isLoggedOut) - Sleep(1); + this->isLoggedIn = false; + this->isLoggedOut = false; + while (!this->isLoggedIn && !this->isLoggedOut) + Sleep(1); } void CAccount::BlockWhileLoggingOut() { - while ( !this->isLoggedOut) - Sleep(1); + this->isLoggedOut = false; + while ( !this->isLoggedOut) + Sleep(1); } // CContactGroup |