diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-18 14:40:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-18 14:40:43 +0000 |
commit | cdbdcef6d92500b3b156ea6e304440e82621aa00 (patch) | |
tree | 6c6673df2824ae7e83dfa8c2c9b2859388c574b7 /protocols/JabberG/src/jabber_util.cpp | |
parent | 08c2fa14c7ee65003e8e9b59567bb4525d17c28c (diff) |
fixes 584
git-svn-id: http://svn.miranda-ng.org/main/trunk@8163 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index a93186ee14..60a575f011 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -714,14 +714,19 @@ void CJabberProto::SendPresence(int status, bool bSendToAll) int __stdcall JabberGetPacketID(HXML n)
{
- int result = -1;
-
const TCHAR *str = xmlGetAttrValue(n, _T("id"));
if (str)
if (!_tcsncmp(str, _T(JABBER_IQID), SIZEOF(JABBER_IQID)-1))
- result = _ttoi(str + SIZEOF(JABBER_IQID)-1);
+ return _ttoi(str + SIZEOF(JABBER_IQID)-1);
- return result;
+ return -1;
+}
+
+TCHAR* __stdcall JabberId2string(int id)
+{
+ TCHAR text[100];
+ mir_sntprintf(text, SIZEOF(text), _T(JABBER_IQID) _T("%d"), id);
+ return mir_tstrdup(text);
}
///////////////////////////////////////////////////////////////////////////////
|