summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.h1
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index b6e70e7aff..a3960c1c6a 100755
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -248,7 +248,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
bool m_bCisAvailable;
bool m_bJabberOnline; // XMPP connection initialized and we can send XMPP packets
bool m_bShutdown;
- bool m_bSendKeepAlive;
bool m_bPepSupported;
bool m_bStreamSent;
bool m_bMamPrefsAvailable;
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();