diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-07 13:52:15 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-07 13:52:15 +0000 |
commit | 3a3ae2263b70483741017e01340d4898248138d2 (patch) | |
tree | c62e6ed90969ad83c1de94a65da2b18a1a11ed0d /protocols | |
parent | 656187b01cfcc0f646f9727cdfb81d677e4d5cfc (diff) |
VKontakte:
fix for stillbirth PollServer
more debug lines in OnReceivePollingInfo
git-svn-id: http://svn.miranda-ng.org/main/trunk@10922 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 2dd4d70a00..a8b56f734d 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -848,8 +848,25 @@ void CVkProto::OnReceivePollingInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * m_pollingTs = mir_t2a(ptrT(json_as_string(json_get(pResponse, "ts"))));
m_pollingKey = mir_t2a(ptrT(json_as_string(json_get(pResponse, "key"))));
m_pollingServer = mir_t2a(ptrT(json_as_string(json_get(pResponse, "server"))));
- if (!m_hPollingThread && m_pollingTs != NULL && m_pollingKey != NULL && m_pollingServer != NULL)
- m_hPollingThread = ForkThreadEx(&CVkProto::PollingThread, NULL, NULL);
+ if (!m_hPollingThread) {
+ debugLogA("CVkProto::OnReceivePollingInfo m_hPollingThread is NULL");
+ debugLogA("CVkProto::OnReceivePollingInfo m_pollingTs = \'%s' m_pollingKey = \'%s\' m_pollingServer = \'%s\'",
+ m_pollingTs ? m_pollingTs : "<NULL>",
+ m_pollingKey ? m_pollingKey : "<NULL>",
+ m_pollingServer ? m_pollingServer : "<NULL>");
+ if (m_pollingTs != NULL && m_pollingKey != NULL && m_pollingServer != NULL){
+ debugLogA("CVkProto::OnReceivePollingInfo PollingThread starting...");
+ m_hPollingThread = ForkThreadEx(&CVkProto::PollingThread, NULL, NULL);
+ }
+ else{
+ debugLogA("CVkProto::OnReceivePollingInfo PollingThread not start");
+ m_pollingConn = NULL;
+ ShutdownSession();
+ return;
+ }
+ }
+ else
+ debugLogA("CVkProto::OnReceivePollingInfo m_hPollingThread is not NULL");
}
void CVkProto::PollUpdates(JSONNODE *pUpdates)
|