diff options
author | ElzorFox <elzorfox@ya.ru> | 2016-12-11 14:17:00 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2016-12-11 14:17:00 +0500 |
commit | fbd4dc4f0548b350b963133b3688e1b54a6fe112 (patch) | |
tree | 030e60b72fa455e7616123bb2955820a555dce52 /protocols | |
parent | 9a44e2ab5dbcce9fd288c57e56cd4b540f35c372 (diff) |
VKontakte: fix (?) set online status after connection problem
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_pollserver.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp index e4a3b5524b..90edf659fb 100644 --- a/protocols/VKontakte/src/vk_pollserver.cpp +++ b/protocols/VKontakte/src/vk_pollserver.cpp @@ -211,7 +211,6 @@ int CVkProto::PollServer() }
else {
debugLogA("CVkProto::PollServer => ShutdownSession");
- m_hPollingThread = NULL;
ShutdownSession();
return 0;
}
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index 57f71ceeb7..b62205cfde 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -172,7 +172,7 @@ void CVkProto::WorkerThread(void*) }
}
- m_hWorkerThread = 0;
+ m_hWorkerThread = NULL;
if (m_hAPIConnection) {
debugLogA("CVkProto::WorkerThread: Netlib_CloseHandle(m_hAPIConnection) beg");
Netlib_CloseHandle(m_hAPIConnection);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 5a5563f3d8..5a2a59a5b3 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -102,11 +102,14 @@ void CVkProto::OnLoggedOut() debugLogA("CVkProto::OnLoggedOut");
m_bOnline = false;
+ m_hPollingThread = NULL;
+ m_hWorkerThread = NULL;
+
if (m_hAPIConnection)
Netlib_CloseHandle(m_hAPIConnection);
if (m_pollingConn)
- CallService(MS_NETLIB_SHUTDOWN, (WPARAM)m_pollingConn);
+ Netlib_Shutdown(m_pollingConn);
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE);
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
|