diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-23 19:23:39 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-23 19:23:39 +0000 |
commit | 037511a364629d200c22cd08e0fa4922f2429bfc (patch) | |
tree | 510680699b0e8eb046b771b9de350b20fd0e7fa8 /protocols/SkypeWeb/src/skype_trouter.cpp | |
parent | a8dfca9c4a079c6d9706fa819b8993a2df5d7270 (diff) |
SkypeWeb: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@15429 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index d53ce95b0f..68ec568c24 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -104,8 +104,8 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response) CMStringA szToken = data.Tokenize(":", iStart).Trim();
TRouter.sessId = szToken.GetString();
- SetEvent(m_hTrouterEvent);
- SetEvent(m_hTrouterHealthEvent);
+ m_hTrouterEvent.Set();
+ m_hTrouterHealthEvent.Set();
if ((time(NULL) - TRouter.lastRegistrationTime) >= 3600)
{
@@ -136,7 +136,7 @@ void CSkypeProto::TRouterThread(void*) while (!m_bThreadsTerminated)
{
- WaitForSingleObject(m_hTrouterEvent, INFINITE);
+ m_hTrouterEvent.Wait();
errors = 0;
while (errors < POLLING_ERRORS_LIMIT && m_iStatus > ID_STATUS_OFFLINE)
@@ -169,7 +169,7 @@ void CSkypeProto::TRouterThread(void*) else
{
SendRequest(new HealthTrouterRequest(TRouter.ccid.c_str()), &CSkypeProto::OnHealth);
- WaitForSingleObject(m_hTrouterHealthEvent, INFINITE);
+ m_hTrouterHealthEvent.Wait();
}
m_TrouterConnection = response->nlc;
}
|