diff options
-rwxr-xr-x | protocols/JabberG/src/jabber_strm_mgmt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_strm_mgmt.cpp b/protocols/JabberG/src/jabber_strm_mgmt.cpp index 10a1172e70..8fcd128f73 100755 --- a/protocols/JabberG/src/jabber_strm_mgmt.cpp +++ b/protocols/JabberG/src/jabber_strm_mgmt.cpp @@ -186,6 +186,8 @@ void strm_mgmt::OnProcessFailed(HXML node, ThreadData * info) //used failed inst void strm_mgmt::CheckStreamFeatures(HXML node)
{
+ if (!IsResumeIdPresent())
+ ResetState(); //this may be necessary to reset counters if session resume id is not set
if (mir_wstrcmp(XmlGetName(node), L"sm") || !XmlGetAttrValue(node, L"xmlns") || mir_wstrcmp(XmlGetAttrValue(node, L"xmlns"), L"urn:xmpp:sm:3")) //we work only with version 3 or higher of sm
return;
if (!(proto->m_bJabberOnline))
@@ -244,7 +246,7 @@ void strm_mgmt::EnableStrmMgmt() XmlAddAttr(enable_sm, L"xmlns", L"urn:xmpp:sm:3");
XmlAddAttr(enable_sm, L"resume", L"true"); //enable resumption (most useful part of this xep)
proto->m_ThreadInfo->send(enable_sm);
- m_nStrmMgmtLocalSCount = 1; //TODO: this MUST be 0, i have bug somewhere.
+ m_nStrmMgmtLocalSCount = 1; //TODO: this MUST be 0, i have bug somewhere, feel free to fix it.
}
else //resume session
{
|