diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index ca4931d6e0..efc8ab8128 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -88,10 +88,10 @@ void CSkypeProto::OnTrouterPoliciesCreated(const NETLIBHTTPREQUEST *response) TRouter.se,
TRouter.sig,
TRouter.instance,
- TRouter.ccid), &CSkypeProto::OnGetTrouter, NULL);
+ TRouter.ccid), &CSkypeProto::OnGetTrouter);
}
-void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p)
+void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response)
{
if (response == NULL || response->pData == NULL)
{
@@ -99,8 +99,6 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p) return;
}
- bool isHealth = p != NULL;
-
CMStringA data(response->pData);
int iStart = 0;
CMStringA szToken = data.Tokenize(":", iStart).Trim();
@@ -110,7 +108,7 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response, void *p) else
SetEvent(m_hTrouterEvent);
- if (!isHealth)
+ if (time(NULL) - (TRouter.lastRegistrationTime - 120) <= 0)
SendRequest(new RegisterTrouterRequest(m_szTokenSecret, TRouter.url.c_str(), TRouter.sessId.c_str()));
}
@@ -124,7 +122,7 @@ void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST*) TRouter.sig,
TRouter.instance,
TRouter.ccid),
- &CSkypeProto::OnGetTrouter, (void *)1);
+ &CSkypeProto::OnGetTrouter);
}
void CSkypeProto::TRouterThread(void*)
|