diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/requests/poll.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_menus.h | 12 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_polling.cpp | 18 |
3 files changed, 16 insertions, 16 deletions
diff --git a/protocols/SkypeWeb/src/requests/poll.h b/protocols/SkypeWeb/src/requests/poll.h index 585a7a1ca4..8e04ef0842 100644 --- a/protocols/SkypeWeb/src/requests/poll.h +++ b/protocols/SkypeWeb/src/requests/poll.h @@ -7,7 +7,7 @@ public: PollRequest(const char *regToken, const char *server = "client-s.gateway.messenger.live.com") :
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints/SELF/subscriptions/0/poll", server)
{
- //timeout = 30 * 1000;
+ timeout = INFINITE;
flags |= NLHRF_PERSISTENT;
Headers
<< CHAR_VALUE("Connection", "keep-alive")
diff --git a/protocols/SkypeWeb/src/skype_menus.h b/protocols/SkypeWeb/src/skype_menus.h index 5a0fcaed6d..1cf6d1a3b2 100644 --- a/protocols/SkypeWeb/src/skype_menus.h +++ b/protocols/SkypeWeb/src/skype_menus.h @@ -2,10 +2,14 @@ #define _SKYPE_MENUS_H_
#define CMI_POSITION -201001000
-#define CMI_AUTH_REQUEST 0
-#define CMI_AUTH_GRANT 1
-#define CMI_GETSERVERHISTORY 2
-#define CMI_MAX 3 // this item shall be the last one
+
+enum
+{
+ CMI_AUTH_REQUEST,
+ CMI_AUTH_GRANT,
+ CMI_GETSERVERHISTORY,
+ CMI_MAX // this item shall be the last one
+};
#define SMI_POSITION 200000
diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index e963aad83b..a4534846b8 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -57,10 +57,8 @@ void CSkypeProto::PollingThread(void*) while (!isTerminated && !breaked && errors < POLLING_ERRORS_LIMIT)
{
PollRequest *request = new PollRequest(regToken, server);
- NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser);
- m_pollingConnection = request->nlc;
- delete request;
-
+ request->nlc = m_pollingConnection;
+ NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser);
if (response != NULL)
{
@@ -71,14 +69,12 @@ void CSkypeProto::PollingThread(void*) continue;
}
ParsePollData (root);
+
+ m_pollingConnection = response->nlc;
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)response);
}
- /*if (response->resultCode != 200)
- {
- errors++;
- continue;
- }
- else
- errors = 0;*/
+
+ delete request;
}
m_hPollingThread = NULL;
m_pollingConnection = NULL;
|