diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-14 22:52:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-14 22:52:50 +0300 |
commit | ac491740cf5529df4902bd715c87c414a240e654 (patch) | |
tree | db735c5cadcf8fee5d3308b4d174dc107354245e | |
parent | 851b84078ace0d0664eb2aef8b0d2207120c3024 (diff) |
Jabber: useless class variable CJabberProto::m_bSendKeepAlive removed, it should be local
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.h | 1 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 8 |
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();
|