From a9fac2d04887b80526ab90c4c8ce45cd482e80b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 Oct 2013 17:27:06 +0000 Subject: - filetransfer::iqid converted from string to int; - further code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_thread.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src/jabber_thread.cpp') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 0aaca01f15..7c826345e5 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1168,7 +1168,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) // If message is from a stranger (not in roster), item is NULL JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from); - if ( !item) + if (item == NULL) item = ListGetItemPtr(LIST_VCARD_TEMP, from); time_t msgTime = 0; @@ -1863,7 +1863,6 @@ void CJabberProto::OnProcessIq(HXML node) if ((type=xmlGetAttrValue(node, _T("type"))) == NULL) return; int id = JabberGetPacketID(node); - const TCHAR *idStr = xmlGetAttrValue(node, _T("id")); queryNode = xmlGetChild(node , "query"); xmlns = xmlGetAttrValue(queryNode, _T("xmlns")); @@ -1887,7 +1886,7 @@ void CJabberProto::OnProcessIq(HXML node) LISTFOREACH(i, this, LIST_FILE) { JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); - if (item->ft != NULL && item->ft->state == FT_CONNECTING && !_tcscmp(idStr, item->ft->iqId)) { + if (item->ft != NULL && item->ft->state == FT_CONNECTING && id == item->ft->iqId) { Log("Denying file sending request"); item->ft->state = FT_DENIED; if (item->ft->hFileEvent != NULL) @@ -1896,7 +1895,7 @@ void CJabberProto::OnProcessIq(HXML node) } } else if ((!_tcscmp(type, _T("get")) || !_tcscmp(type, _T("set")))) { - XmlNodeIq iq(_T("error"), idStr, xmlGetAttrValue(node, _T("from"))); + XmlNodeIq iq(_T("error"), id, xmlGetAttrValue(node, _T("from"))); HXML pFirstChild = xmlGetChild(node , 0); if (pFirstChild) -- cgit v1.2.3