summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-03 17:27:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-03 17:27:06 +0000
commita9fac2d04887b80526ab90c4c8ce45cd482e80b2 (patch)
tree0bc62363778c6110d16016816650278a147049f7 /protocols/JabberG/src/jabber_thread.cpp
parent9257dc8641a40437ceda38b65f4be7390e57954b (diff)
- 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
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp7
1 files changed, 3 insertions, 4 deletions
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)