From 136e53ee849e3de39c92c66ee1993c170f65399c Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 2 May 2015 07:21:20 +0000 Subject: SkypeWeb: Login fix(?). git-svn-id: http://svn.miranda-ng.org/main/trunk@13356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_login.cpp | 2 +- protocols/SkypeWeb/src/skype_trouter.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 2b07079633..6e00f87e7b 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -109,7 +109,6 @@ void CSkypeProto::OnLoginSuccess() TokenSecret = getStringA("TokenSecret"); Server = getStringA("Server") != NULL ? getStringA("Server") : SKYPE_ENDPOINTS_HOST; SendRequest(new CreateEndpointRequest(TokenSecret, Server), &CSkypeProto::OnEndpointCreated); - SendRequest(new CreateTrouterRequest(), &CSkypeProto::OnCreateTrouter); PushRequest(new GetProfileRequest(TokenSecret), &CSkypeProto::LoadProfile); PushRequest(new GetAvatarRequest(ptrA(getStringA("AvatarUrl"))), &CSkypeProto::OnReceiveAvatar, NULL); PushRequest(new GetContactListRequest(TokenSecret), &CSkypeProto::LoadContactList); @@ -179,6 +178,7 @@ void CSkypeProto::OnEndpointCreated(const NETLIBHTTPREQUEST *response) RegToken = getStringA("registrationToken"); EndpointId = getStringA("endpointId"); SendRequest(new CreateSubscriptionsRequest(RegToken, Server), &CSkypeProto::OnSubscriptionsCreated); + SendRequest(new CreateTrouterRequest(), &CSkypeProto::OnCreateTrouter); } void CSkypeProto::OnSubscriptionsCreated(const NETLIBHTTPREQUEST *response) diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 3f76c3e731..ff45e744cd 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -94,13 +94,13 @@ void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers) ptrT displayname(json_as_string(json_get(body, "displayName"))); ptrT cuid(json_as_string(json_get(body, "callerId"))); ptrT uid(json_as_string(json_get(body, "conversationId"))); - ptrA callId(mir_t2a(ptrT(json_as_string(json_get(body, "callId"))))); int evt = json_as_int(json_get(body, "evt")); switch (evt) { case 100: //incoming call - { + { + ptrA callId(mir_t2a(ptrT(json_as_string(json_get(body, "convoCallId"))))); if (uid != NULL) { MCONTACT hContact = AddContact(_T2A(uid), true); @@ -129,6 +129,7 @@ void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers) } case 104: //call canceled: callerId=""; conversationId=NULL; callId=call id { + ptrA callId(mir_t2a(ptrT(json_as_string(json_get(body, "callId"))))); break; } } -- cgit v1.2.3