From 157801507625921ba1e39988fe54e27a9157daa4 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 29 Apr 2015 14:23:56 +0000 Subject: SkypeWeb: Small fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@13242 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/trouter.h | 10 +++++----- protocols/SkypeWeb/src/skype_history_sync.cpp | 2 +- protocols/SkypeWeb/src/skype_trouter.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/protocols/SkypeWeb/src/requests/trouter.h b/protocols/SkypeWeb/src/requests/trouter.h index 02f29e84d9..193c4310ce 100644 --- a/protocols/SkypeWeb/src/requests/trouter.h +++ b/protocols/SkypeWeb/src/requests/trouter.h @@ -52,22 +52,22 @@ public: class GetTrouterRequest : public HttpRequest { public: - GetTrouterRequest(const char *socketio, const char *sr, int st, int se, const char *sig, + GetTrouterRequest(const char *socketio, const char *sr, const char *st, const char *se, const char *sig, const char *instance, const char *ccid) : - HttpRequest(REQUEST_POST, FORMAT, "%ssocket.io/1/", socketio) + HttpRequest(REQUEST_GET, FORMAT, "%ssocket.io/1/", socketio) { Url << CHAR_VALUE("sr", sr) << CHAR_VALUE("issuer", "edf") << CHAR_VALUE("sp", "connect") - << INT_VALUE("st", st) - << INT_VALUE("se", se) + << CHAR_VALUE("st", st) + << CHAR_VALUE("se", se) << CHAR_VALUE("sig", sig) << CHAR_VALUE("r", instance) << CHAR_VALUE("v", "v2") << INT_VALUE("p", 443) << CHAR_VALUE("ccid", ccid) - << CHAR_VALUE("tc", ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}"))) + << CHAR_VALUE("tc", "%7B%22cv%22:%222014.8.26%22,%22hr%22:%22%22,%22ua%22:%22SWX%22,%22v%22:%221.2.273%22%7D")//ptrA(mir_urlEncode("{\"cv\":\"2014.8.26\",\"hr\":\"\",\"ua\":\"Miranda_NG\",\"v\":\"\"}"))) << INT_VALUE("t", time(NULL)*1000); Headers diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index f4dfda202b..1ba6e40ac3 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -240,7 +240,7 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response) else continue; - MCONTACT hContact = AddContact(skypename); + MCONTACT hContact = AddContact(skypename, true); if (GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL) PushRequest(new GetHistoryRequest(RegToken, skypename, 100, false, 0, Server), &CSkypeProto::OnGetServerHistory); diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index c1c2b33468..a9071bf780 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -45,8 +45,8 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) JSONROOT root(response->pData); - int st = _ttoi(json_as_string(json_get(root, "st"))); - int se = _ttoi(json_as_string(json_get(root, "se"))); + ptrA st(mir_t2a(ptrT(json_as_string(json_get(root, "st"))))); + ptrA se(mir_t2a(ptrT(json_as_string(json_get(root, "se"))))); ptrA sig(mir_t2a(ptrT(json_as_string(json_get(root, "sig"))))); SendRequest(new GetTrouterRequest @@ -67,7 +67,7 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response) return; CMStringA data(response->pData); int iStart = 0; - CMStringA szToken = data.Tokenize(";", iStart).Trim(); + CMStringA szToken = data.Tokenize(":", iStart).Trim(); setString("Trouter_SessId", szToken); } -- cgit v1.2.3