diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-02 17:28:01 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-02 17:28:01 +0000 |
commit | cac4fe1a1a81d3262af46be94a85f69b81021ccc (patch) | |
tree | 5185c2853e11458d940f257542182d59539e893d | |
parent | 5a94bdd5833fd13bb0404c549be79d51c9a9547f (diff) |
SkypeWeb: Not register trouter arfer health.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13382 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 13b0dc16af..cc9668083d 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -150,7 +150,7 @@ private: void OnCreateTrouter(const NETLIBHTTPREQUEST *response);
void OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response);
- void OnGetTrouter(const NETLIBHTTPREQUEST *response);
+ void OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p);
void OnHealth(const NETLIBHTTPREQUEST *response);
void OnTrouterEvent(JSONNODE *body, JSONNODE *headers);
void __cdecl CSkypeProto::TRouterThread(void*);
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 59eb581d71..0546cda1b5 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -58,21 +58,25 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) st, se, sig,
getStringA("Trouter_instance"),
getStringA("Trouter_ccid")
- ), &CSkypeProto::OnGetTrouter);
+ ), &CSkypeProto::OnGetTrouter, (void *)false);
}
-void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response)
+void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p)
{
if (response == NULL || response->pData == NULL)
return;
+
+ bool isHealth = (bool)p;
+
CMStringA data(response->pData);
int iStart = 0;
CMStringA szToken = data.Tokenize(":", iStart).Trim();
setString("Trouter_SessId", szToken);
m_hTrouterThread = ForkThreadEx(&CSkypeProto::TRouterThread, 0, NULL);
- SendRequest(new RegisterTrouterRequest(TokenSecret, ptrA(getStringA("Trouter_url")), szToken));
+ if (!isHealth)
+ SendRequest(new RegisterTrouterRequest(TokenSecret, ptrA(getStringA("Trouter_url")), szToken));
}
void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST*)
@@ -86,7 +90,7 @@ void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST*) ptrA sessId(getStringA("Trouter_SessId"));
ptrA sig(getStringA("Trouter_sig"));
- SendRequest(new GetTrouterRequest(socketIo, connId, st, se, sig, instance, ccid), &CSkypeProto::OnGetTrouter);
+ SendRequest(new GetTrouterRequest(socketIo, connId, st, se, sig, instance, ccid), &CSkypeProto::OnGetTrouter, (void *)true);
}
void CSkypeProto::OnTrouterEvent(JSONNODE *body, JSONNODE *headers)
|