summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-29 14:23:56 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-29 14:23:56 +0000
commit157801507625921ba1e39988fe54e27a9157daa4 (patch)
tree9bc25f1c227617ecd61854dbdfa22e6bf0d2682f /protocols/SkypeWeb
parentd667adb8f13d6e8917c225260631ad6905c3fbcf (diff)
SkypeWeb: Small fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13242 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/requests/trouter.h10
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp6
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);
}