summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-14 22:52:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-14 22:52:50 +0300
commitac491740cf5529df4902bd715c87c414a240e654 (patch)
treedb735c5cadcf8fee5d3308b4d174dc107354245e /protocols/JabberG/src/jabber_thread.cpp
parent851b84078ace0d0664eb2aef8b0d2207120c3024 (diff)
Jabber: useless class variable CJabberProto::m_bSendKeepAlive removed, it should be local
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index e4124dc65a..80b23bdb09 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -385,9 +385,11 @@ LBL_FatalError:
// User may change status to OFFLINE while we are connecting above
if (m_iDesiredStatus != ID_STATUS_OFFLINE || info.bIsReg) {
+ bool bSendKeepAlive = false;
+
if (!info.bIsReg) {
m_szJabberJID = CMStringA(FORMAT, "%s@%s", info.conn.username, info.conn.server).Detach();
- m_bSendKeepAlive = m_bKeepAlive != 0;
+ bSendKeepAlive = m_bKeepAlive;
setUString("jid", m_szJabberJID); // store jid in database
ListInit();
@@ -413,14 +415,14 @@ LBL_FatalError:
if (nSelRes == -1) // error
break;
else if (nSelRes == 0) {
- if (m_bSendKeepAlive) {
+ if (bSendKeepAlive) {
if (info.jabberServerCaps & JABBER_CAPS_PING) {
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnPingReply, JABBER_IQ_TYPE_GET, nullptr, this);
pInfo->SetTimeout(m_iConnectionKeepAliveTimeout);
info.send(XmlNodeIq(pInfo) << XATTR("from", info.fullJID) << XCHILDNS("ping", JABBER_FEAT_PING));
}
+ else info.send(" \t ");
}
- else info.send(" \t ");
if (m_bEnableStreamMgmt)
m_StrmMgmt.RequestAck();