summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-14 02:09:07 -0700
committerGeorge Hazan <ghazan@miranda.im>2022-09-14 02:09:07 -0700
commit73432d343884b943bae834e03ce68a8677fe932e (patch)
tree9586fb93761a418e90e0c35e7a2b4124a6020da2
parentf37ebb5b91504b621a048c66c3deedf0a6baf4a6 (diff)
useless field ThreadData::bIsSessionAvailable removed
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp8
-rw-r--r--protocols/JabberG/src/jabber_strm_mgmt.cpp4
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp3
-rw-r--r--protocols/JabberG/src/stdafx.h2
4 files changed, 6 insertions, 11 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 9ec0dfee1e..df222552fa 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -389,6 +389,7 @@ void CJabberProto::OnIqResultBind(const TiXmlElement *iqNode, CJabberIqInfo *pIn
{
if (!m_ThreadInfo || !iqNode)
return;
+
if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
const char *szJid = XmlGetChildText(XmlGetChildByTag(iqNode, "bind", "xmlns", JABBER_FEAT_BIND), "jid");
if (szJid) {
@@ -399,12 +400,13 @@ void CJabberProto::OnIqResultBind(const TiXmlElement *iqNode, CJabberIqInfo *pIn
strncpy_s(m_ThreadInfo->fullJID, szJid, _TRUNCATE);
}
}
- if (m_ThreadInfo->bIsSessionAvailable)
+
+ if (m_isSessionAvailable) {
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultSession, JABBER_IQ_TYPE_SET))
<< XCHILDNS("session", "urn:ietf:params:xml:ns:xmpp-session"));
- else
- OnLoggedIn();
+ }
+ else OnLoggedIn();
}
else {
//rfc3920 page 39
diff --git a/protocols/JabberG/src/jabber_strm_mgmt.cpp b/protocols/JabberG/src/jabber_strm_mgmt.cpp
index cbba6b5daa..e0f95eb2a8 100644
--- a/protocols/JabberG/src/jabber_strm_mgmt.cpp
+++ b/protocols/JabberG/src/jabber_strm_mgmt.cpp
@@ -301,10 +301,6 @@ void strm_mgmt::FinishLoginProcess(ThreadData *info)
XmlNodeIq(proto->AddIQ(&CJabberProto::OnIqResultBind, JABBER_IQ_TYPE_SET))
<< XCHILDNS("bind", JABBER_FEAT_BIND)
<< XCHILD("resource", info->resource));
-
- if (proto->m_isSessionAvailable)
- info->bIsSessionAvailable = true;
-
return;
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 9a11faba97..292f36e7bc 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -737,9 +737,6 @@ void CJabberProto::OnProcessFeatures(const TiXmlElement *node, ThreadData *info)
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultBind, JABBER_IQ_TYPE_SET))
<< XCHILDNS("bind", JABBER_FEAT_BIND)
<< XCHILD("resource", info->resource));
-
- if (m_isSessionAvailable)
- info->bIsSessionAvailable = true;
}
else // mechanisms are not available and we are not logged in
PerformIqAuth(info);
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index 6147577fa3..dc0dc76647 100644
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -368,7 +368,7 @@ struct ThreadData
// features & registration
bool bIsReg;
- bool reg_done, bIsSessionAvailable;
+ bool reg_done;
bool bBookmarksLoaded;
uint32_t dwLoginRqs;