diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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)
|