summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprotocols/JabberG/src/jabber_strm_mgmt.cpp9
-rwxr-xr-xprotocols/JabberG/src/jabber_strm_mgmt.h1
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp6
3 files changed, 16 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_strm_mgmt.cpp b/protocols/JabberG/src/jabber_strm_mgmt.cpp
index 7a02b20471..485174e42d 100755
--- a/protocols/JabberG/src/jabber_strm_mgmt.cpp
+++ b/protocols/JabberG/src/jabber_strm_mgmt.cpp
@@ -164,6 +164,8 @@ void strm_mgmt::CheckStreamFeatures(HXML node)
void strm_mgmt::CheckState()
{
+ if (m_bStrmMgmtEnabled)
+ return;
if (!m_bStrmMgmtPendingEnable)
return;
EnableStrmMgmt();
@@ -201,6 +203,8 @@ void strm_mgmt::HandleIncommingNode(HXML node)
void strm_mgmt::EnableStrmMgmt()
{
+ if (m_bStrmMgmtEnabled)
+ return;
if (m_sStrmMgmtResumeId.empty())
{
XmlNode enable_sm(L"enable");
@@ -241,4 +245,9 @@ void strm_mgmt::RequestAck()
bool strm_mgmt::IsSessionResumed()
{
return bSessionResumed;
+}
+
+bool strm_mgmt::IsResumeIdPresent()
+{
+ return !m_sStrmMgmtResumeId.empty();
} \ No newline at end of file
diff --git a/protocols/JabberG/src/jabber_strm_mgmt.h b/protocols/JabberG/src/jabber_strm_mgmt.h
index 1791afd8eb..03d3cd42e0 100755
--- a/protocols/JabberG/src/jabber_strm_mgmt.h
+++ b/protocols/JabberG/src/jabber_strm_mgmt.h
@@ -55,6 +55,7 @@ public:
void SendAck();
void RequestAck();
bool IsSessionResumed();
+ bool IsResumeIdPresent();
};
#endif //JABBER_STRM_MGMT_H \ No newline at end of file
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 7199b5181c..c032af1727 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -760,6 +760,12 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info)
return;
}
+ if (m_bEnableStreamMgmt) //resume should be done here
+ {
+ if (m_StrmMgmt.IsResumeIdPresent())
+ m_StrmMgmt.CheckState();
+ }
+
// mechanisms are not defined.
if (info->auth) { //We are already logged-in
info->send(