summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-17 21:32:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-17 21:32:23 +0300
commite43832b984686d57298cf5119f4bdf7f75f11f34 (patch)
tree0bcd18aba721d84c088bc961ae3b70ee39f6f9e9 /protocols/JabberG
parent45e8cd4d903d4ea823f0ab4ca2e7afe27ddc514b (diff)
more logs
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index b34f867053..1a68e6914a 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -126,6 +126,7 @@ void CJabberProto::OnPingReply(HXML, CJabberIqInfo *pInfo)
{
if (!pInfo)
return;
+
if (pInfo->GetIqType() == JABBER_IQ_TYPE_FAIL) {
// disconnect because of timeout
if (m_bEnableStreamMgmt)
@@ -219,9 +220,8 @@ void CJabberProto::xmlStreamInitializeNow(ThreadData *info)
void CJabberProto::ServerThread(JABBER_CONN_DATA *pParam)
{
- ptrW tszValue;
-
ThreadData info(this, pParam);
+ ptrW tszValue;
debugLogA("Thread started: type=%d", info.bIsReg);
Thread_SetName("Jabber: ServerThread");
@@ -493,7 +493,8 @@ recvRest:
if ((info.buffer = (char*)mir_realloc(info.buffer, jabberNetworkBufferSize + 1)) == nullptr) {
debugLogA("Cannot reallocate more network buffer, go offline now");
break;
- } }
+ }
+ }
else debugLogA("Unknown state: bytesParsed=%d, datalen=%d, jabberNetworkBufferSize=%d", bytesParsed, datalen, jabberNetworkBufferSize);
if (m_szXmlStreamToBeInitialized) {
@@ -531,9 +532,9 @@ recvRest:
ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
// Set all contacts to offline
- if (!m_StrmMgmt.IsResumeIdPresent())
- {
- m_StrmMgmt.ResetState(); //fully reset strm_mgmt state
+ debugLogA("leaving worker thread");
+ if (!m_StrmMgmt.IsResumeIdPresent()) {
+ m_StrmMgmt.ResetState(); // fully reset strm_mgmt state
for (auto &hContact : AccContacts())
SetContactOfflineStatus(hContact);
}