diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-04-16 17:07:36 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-04-16 17:07:36 +0300 |
commit | c4eee43d0cabf562c977e43753b8c2595c4aebe9 (patch) | |
tree | e0e5444cbbb860885a5f847246cfe2fd35ec029d /protocols | |
parent | 4dfad498654925efad1d8505822f830371d3170b (diff) |
protocols: jabber: xep-0198
- added basic console logging
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber_strm_mgmt.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_strm_mgmt.cpp b/protocols/JabberG/src/jabber_strm_mgmt.cpp index 485174e42d..21c9bc4d41 100755 --- a/protocols/JabberG/src/jabber_strm_mgmt.cpp +++ b/protocols/JabberG/src/jabber_strm_mgmt.cpp @@ -68,6 +68,7 @@ void strm_mgmt::OnProcessResumed(HXML node, ThreadData * /*info*/) int size = m_nStrmMgmtLocalSCount - m_nStrmMgmtSrvHCount;
if (size < 0)
{
+ proto->debugLogA("strm_mgmt: error: locally sent nodes count %d, server side received count %d", m_nStrmMgmtLocalSCount, m_nStrmMgmtSrvHCount);
//TODO: this should never happen, indicates server side bug
//TODO: once our client side implementation good enough, abort stream in this case, noop for now
}
@@ -87,9 +88,11 @@ void strm_mgmt::OnProcessSMa(HXML node) return;
auto val = XmlGetAttrValue(node, L"h");
m_nStrmMgmtSrvHCount = _wtoi(val);
+ proto->debugLogA("strm_mgmt: info: locally sent nodes count %d, server side received count %d", m_nStrmMgmtLocalSCount, m_nStrmMgmtSrvHCount);
int size = m_nStrmMgmtLocalSCount - m_nStrmMgmtSrvHCount;
if (size < 0)
{
+ proto->debugLogA("strm_mgmt: error: locally sent nodes count %d, server side received count %d", m_nStrmMgmtLocalSCount, m_nStrmMgmtSrvHCount);
//TODO: this should never happen, indicates server side bug
//TODO: once our client side implementation good enough, abort stream in this case, noop for now
}
@@ -105,8 +108,10 @@ void strm_mgmt::OnProcessSMa(HXML node) void strm_mgmt::ResendNodes(uint32_t size)
{
+ proto->debugLogA("strm_mgmt: info: resending %d missed nodes", size);
if (size < NodeCache.size())
{
+ proto->debugLogA("strm_mgmt: info: resending nodes: need to resend %d nodes, nodes in cache %d, cleaning cache to match resending node count", size, NodeCache.size());
const size_t diff = NodeCache.size() - size;
if (diff)
{
@@ -146,6 +151,7 @@ void strm_mgmt::OnProcessFailed(HXML node, ThreadData * /*info*/) //used failed {
if (mir_wstrcmp(XmlGetAttrValue(node, L"xmlns"), L"urn:xmpp:sm:3"))
return;
+ proto->debugLogW(L"strm_mgmt: error: Failed to resume session %s", m_sStrmMgmtResumeId.c_str());
m_bStrmMgmtEnabled = false;
bSessionResumed = false;
m_sStrmMgmtResumeId.clear();
@@ -227,6 +233,7 @@ void strm_mgmt::SendAck() {
if (!m_bStrmMgmtEnabled)
return;
+ proto->debugLogA("strm_mgmt: info: sending ack: locally received node count %d", m_nStrmMgmtLocalHCount);
XmlNode enable_sm(L"a");
XmlAddAttr(enable_sm, L"xmlns", L"urn:xmpp:sm:3");
xmlAddAttrInt(enable_sm, L"h", m_nStrmMgmtLocalHCount);
|