diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-14 17:21:31 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-14 17:21:31 +0000 |
commit | 5116d00341d784f690650bc4da8a5daed493fd59 (patch) | |
tree | 15b3af321689f2d306a52dec97746f7a974fb1b0 /protocols/SkypeWeb/src/skype_proto.cpp | |
parent | 1681b4828192e02e34c74a65387562a8b2215faa (diff) |
SkypeWeb: Login/logout refactoring part 1.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 11 |
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
{
|