diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-26 18:44:49 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-26 18:44:49 +0300 |
commit | c89b7af83f86699b0f7b2564d8c301c9f60aaf4e (patch) | |
tree | 0d46f5c711fddfb4ad4e864841731c8aae21393e /protocols | |
parent | 7b071d9e58a8abbfeac5914153d19b0dffc017c9 (diff) |
- fixes #2150 (SkypeWeb hangs on sync);
- fixes problems with Skype disconnections;
- version bump
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/requests/poll.h | 9 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_network.cpp | 5 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_polling.cpp | 7 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/version.h | 2 |
6 files changed, 10 insertions, 16 deletions
diff --git a/protocols/SkypeWeb/src/requests/poll.h b/protocols/SkypeWeb/src/requests/poll.h index 026f7f8c76..62455a1931 100644 --- a/protocols/SkypeWeb/src/requests/poll.h +++ b/protocols/SkypeWeb/src/requests/poll.h @@ -25,10 +25,13 @@ public: HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints/SELF/subscriptions/0/poll", ppro->m_szServer)
{
timeout = 60000;
- flags |= NLHRF_PERSISTENT;
Headers
- << CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
+ << CHAR_VALUE("Referer", "https://web.skype.com/main")
+ << CHAR_VALUE("Content-Type", "application/x-www-form-urlencoded")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
+ << CHAR_VALUE("ClientInfo", "os=Windows; osVer=8.1; proc=Win32; lcid=en-us; deviceType=1; country=n/a; clientName=swx-skype.com; clientVer=908/1.85.0.29")
+ << CHAR_VALUE("Accept", "application/json; ver=1.0")
+ << CHAR_VALUE("Accept-Language", "en, C");
}
};
#endif //_SKYPE_POLL_H_
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_network.cpp b/protocols/SkypeWeb/src/skype_network.cpp index bd56c4252f..2326aee297 100644 --- a/protocols/SkypeWeb/src/skype_network.cpp +++ b/protocols/SkypeWeb/src/skype_network.cpp @@ -35,9 +35,6 @@ void CSkypeProto::UnInitNetwork() void CSkypeProto::ShutdownConnections()
{
- Netlib_CloseHandle(m_pollingConnection);
Netlib_CloseHandle(m_TrouterConnection);
-
- m_pollingConnection = m_TrouterConnection = nullptr;
- //Netlib_Shutdown(m_hNetlibUser);
+ m_TrouterConnection = nullptr;
}
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index 49fc26fe2b..fc9ea70532 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -31,12 +31,9 @@ void CSkypeProto::PollingThread(void*) PollRequest *request = new PollRequest(this);
while ((nErrors < POLLING_ERRORS_LIMIT) && m_iStatus != ID_STATUS_OFFLINE) {
- request->nlc = m_pollingConnection;
NLHR_PTR response(request->Send(m_hNetlibUser));
-
- if (response == NULL) {
+ if (response == nullptr) {
nErrors++;
- m_pollingConnection = nullptr;
continue;
}
@@ -55,7 +52,6 @@ void CSkypeProto::PollingThread(void*) break;
}
}
- m_pollingConnection = response->nlc;
}
delete request;
@@ -65,7 +61,6 @@ void CSkypeProto::PollingThread(void*) }
}
m_hPollingThread = nullptr;
- m_pollingConnection = nullptr;
debugLogA(__FUNCTION__ ": leaving");
}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 3bc30f8b42..0db6e26836 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -25,7 +25,6 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) : m_OutMessages(3, PtrKeySortT), m_bThreadsTerminated(false), m_TrouterConnection(nullptr), - m_pollingConnection(nullptr), m_opts(this), Contacts(this), m_szServer(mir_strdup(SKYPE_ENDPOINTS_HOST)) diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 504b6084d9..e8d93e62a1 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -128,7 +128,7 @@ private: std::map<std::string, std::string> cookies;
static std::map<std::wstring, std::wstring> languages;
- HNETLIBCONN m_pollingConnection, m_TrouterConnection;
+ HNETLIBCONN m_TrouterConnection;
HANDLE m_hPollingThread, m_hTrouterThread;
TRInfo TRouter;
diff --git a/protocols/SkypeWeb/src/version.h b/protocols/SkypeWeb/src/version.h index bbddcb1114..f62177d12b 100644 --- a/protocols/SkypeWeb/src/version.h +++ b/protocols/SkypeWeb/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 12
#define __RELEASE_NUM 3
-#define __BUILD_NUM 5
+#define __BUILD_NUM 6
#include <stdver.h>
|