diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-08 20:34:40 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-08 20:34:40 +0000 |
commit | 97cdf4cf1a9bdf132477708c0cb150ce1b6e118f (patch) | |
tree | 283f998d6a7212c6d48872aa049e4a420c03f1d2 /protocols/SkypeWeb/src/skype_proto.cpp | |
parent | 6148761669741440a617e27f03c9eaf0e9038818 (diff) |
SkypeWeb: cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12683 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 91ab87bc78..2ff641a103 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -160,19 +160,21 @@ int CSkypeProto::SetStatus(int iNewStatus) {
// logout
isTerminated = true;
+ if (m_pollingConnection)
+ CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConnection, 0);
- //if (m_pollingConnection)
- // CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConnection, 0);
-
- LogoutRequest *logoutRequest = new LogoutRequest();
- if (!cookies.empty())
+ if (m_iStatus > ID_STATUS_CONNECTING + 1)
{
- CMStringA allCookies;
- for (std::map<std::string, std::string>::iterator cookie = cookies.begin(); cookie != cookies.end(); ++cookie)
- allCookies.AppendFormat("%s=%s; ", cookie->first.c_str(), cookie->second.c_str());
- logoutRequest->Headers << CHAR_VALUE("Set-Cookie", allCookies);
+ LogoutRequest *logoutRequest = new LogoutRequest();
+ if (!cookies.empty())
+ {
+ CMStringA allCookies;
+ for (std::map<std::string, std::string>::iterator cookie = cookies.begin(); cookie != cookies.end(); ++cookie)
+ allCookies.AppendFormat("%s=%s; ", cookie->first.c_str(), cookie->second.c_str());
+ logoutRequest->Headers << CHAR_VALUE("Set-Cookie", allCookies);
+ }
+ PushRequest(logoutRequest);
}
- PushRequest(logoutRequest);
requestQueue->Stop();
if (!Miranda_Terminated())
@@ -184,7 +186,8 @@ int CSkypeProto::SetStatus(int iNewStatus) {
if (old_status == ID_STATUS_CONNECTING)
return 0;
- else if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
+
+ if (old_status == ID_STATUS_OFFLINE && m_iStatus == ID_STATUS_OFFLINE)
{
// login
m_iStatus = ID_STATUS_CONNECTING;
|