summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/requests/endpoint.h1
-rw-r--r--protocols/SkypeWeb/src/skype_login.cpp17
-rw-r--r--protocols/SkypeWeb/src/skype_polling.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h
index 51c7e6f634..be4a5d9ce7 100644
--- a/protocols/SkypeWeb/src/requests/endpoint.h
+++ b/protocols/SkypeWeb/src/requests/endpoint.h
@@ -7,7 +7,6 @@ public:
CreateEndpointRequest(const char *token, const char *server = "client-s.gateway.messenger.live.com") :
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/endpoints", server)
{
-
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp
index ea5a949af0..83c2d7883f 100644
--- a/protocols/SkypeWeb/src/skype_login.cpp
+++ b/protocols/SkypeWeb/src/skype_login.cpp
@@ -90,7 +90,7 @@ void CSkypeProto::OnLoginSecond(const NETLIBHTTPREQUEST *response)
}
ptrA server(getStringA("Server"));
- PushRequest(new CreateEndpointRequest(token.c_str()), &CSkypeProto::OnEndpointCreated);
+ PushRequest(new CreateEndpointRequest(token.c_str(), server), &CSkypeProto::OnEndpointCreated);
PushRequest(new GetProfileRequest(token.c_str()), &CSkypeProto::LoadProfile);
PushRequest(new GetContactListRequest(token.c_str()), &CSkypeProto::LoadContactList);
@@ -133,14 +133,14 @@ void CSkypeProto::OnEndpointCreated(const NETLIBHTTPREQUEST *response)
if (response->resultCode != 201)
{
ptrA token(getStringA("Token"));
- PushRequest(new CreateEndpointRequest(token), &CSkypeProto::OnEndpointCreated);
+ PushRequest(new CreateEndpointRequest(token, server), &CSkypeProto::OnEndpointCreated);
return;
}
ptrA regToken(getStringA("registrationToken"));
- PushRequest(new CreateSubscriptionsRequest(regToken), &CSkypeProto::OnSubscriptionsCreated);
+ PushRequest(new CreateSubscriptionsRequest(regToken, server), &CSkypeProto::OnSubscriptionsCreated);
}
void CSkypeProto::OnSubscriptionsCreated(const NETLIBHTTPREQUEST *response)
@@ -150,15 +150,16 @@ void CSkypeProto::OnSubscriptionsCreated(const NETLIBHTTPREQUEST *response)
ptrA regToken(getStringA("registrationToken"));
ptrA skypename(getStringA(SKYPE_SETTINGS_ID));
- //ptrA endpoint(getStringA("endpointId"));
- //PushRequest(new SendCapabilitiesRequest(regToken, endpoint));
- //PushRequest(new SetStatusRequest(regToken, MirandaToSkypeStatus(m_iDesiredStatus)), &CSkypeProto::OnStatusChanged);
- PushRequest(new GetContactStatusRequest(regToken, skypename), &CSkypeProto::OnStatusChanged);
+ ptrA endpoint(getStringA("endpointId"));
+ ptrA server(getStringA("Server"));
+ PushRequest(new SendCapabilitiesRequest(regToken, endpoint, server));
+ PushRequest(new SetStatusRequest(regToken, MirandaToSkypeStatus(m_iDesiredStatus), server), &CSkypeProto::OnStatusChanged);
+ //PushRequest(new GetContactStatusRequest(regToken, skypename), &CSkypeProto::OnStatusChanged);
LIST<char> skypenames(1);
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
skypenames.insert(getStringA(hContact, SKYPE_SETTINGS_ID));
- PushRequest(new CreateContactsRequest(regToken, skypenames));
+ PushRequest(new CreateContactsRequest(regToken, skypenames, server));
for (int i = 0; i < skypenames.getCount(); i++)
mir_free(skypenames[i]);
skypenames.destroy();
diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp
index fb2ea0fd7b..0a1905ff13 100644
--- a/protocols/SkypeWeb/src/skype_polling.cpp
+++ b/protocols/SkypeWeb/src/skype_polling.cpp
@@ -52,7 +52,7 @@ void CSkypeProto::PollingThread(void*)
isTerminated = false;
while (!isTerminated && !breaked && errors < POLLING_ERRORS_LIMIT)
{
- PollRequest *request = new PollRequest(regToken);
+ PollRequest *request = new PollRequest(regToken, server);
request->nlc = m_pollingConnection;
NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser);