diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
commit | 680873487c4a7987012606119a744e5ca725ad30 (patch) | |
tree | 8e5fbc68a253c3ec44287754c9295670f1ee44c3 /protocols/JabberG/src/jabber_thread.cpp | |
parent | 6c4136504c660bf3359e6641362672c4b9502be5 (diff) |
merge with trunk
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 486fd6fbcc..880e6eb0f9 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -424,13 +424,13 @@ LBL_FatalError: else if (nSelRes == 0) {
if (m_bSendKeepAlive) {
if (info.jabberServerCaps & JABBER_CAPS_PING) {
- CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnPingReply, JABBER_IQ_TYPE_GET, nullptr, 0, -1, this);
+ 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 "); //TODO: why do we need this ?
+ else info.send(" \t ");
+
if (m_bEnableStreamMgmt)
m_StrmMgmt.RequestAck();
}
@@ -1298,9 +1298,8 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) auto *idNode = XmlFirstChild(xNode, "id");
if (XmlFirstChild(xNode, "delivered") != nullptr || XmlFirstChild(xNode, "offline") != nullptr) {
int id = -1;
- if (idNode != nullptr && idNode->GetText() != nullptr)
- if (!strncmp(idNode->GetText(), JABBER_IQID, mir_strlen(JABBER_IQID)))
- id = atoi((idNode->GetText()) + mir_strlen(JABBER_IQID));
+ if (idNode != nullptr)
+ id = JabberGetPacketID(idNode->GetText());
if (id != -1)
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)id, 0);
|