summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 1f363811ca..2016277832 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -172,7 +172,7 @@ int CSkypeProto::SetStatus(int iNewStatus)
if (m_pollingConnection)
CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConnection, 0);
- if (m_iStatus > ID_STATUS_CONNECTING + 1)
+ /*if (m_iStatus > ID_STATUS_CONNECTING + 1)
{
LogoutRequest *logoutRequest = new LogoutRequest();
if (!cookies.empty())
@@ -183,7 +183,7 @@ int CSkypeProto::SetStatus(int iNewStatus)
logoutRequest->Headers << CHAR_VALUE("Cookie", allCookies);
}
PushRequest(logoutRequest);
- }
+ }*/
requestQueue->Stop();
if (!Miranda_Terminated())
@@ -201,7 +201,12 @@ int CSkypeProto::SetStatus(int iNewStatus)
// login
m_iStatus = ID_STATUS_CONNECTING;
requestQueue->Start();
- PushRequest(new LoginRequest(), &CSkypeProto::OnLoginFirst);
+ int tokenExpires(getDword("TokenExpiresIn", 0));
+ debugLogA("%lli %lli", tokenExpires, time(NULL));
+ if ((tokenExpires - 1800) > time(NULL))
+ OnLoginSuccess();
+ else
+ PushRequest(new LoginRequest(), &CSkypeProto::OnLoginFirst);
}
else
{