From 44d6b953f94d5c34a2d50e12c7416aa9a2e19b70 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 May 2015 21:32:23 +0000 Subject: end of major perversion in Jabber: JABBER_SEARCH_RESULT git-svn-id: http://svn.miranda-ng.org/main/trunk@13916 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_proto.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'protocols/JabberG/src/jabber_proto.cpp') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 1ae734e4ba..6fcc49e023 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -332,12 +332,10 @@ MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) MCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { - if (psr->cbSize != sizeof(JABBER_SEARCH_RESULT) && psr->id == NULL) + if (psr->cbSize != sizeof(PROTOSEARCHRESULT) && psr->id == NULL) return NULL; - JABBER_SEARCH_RESULT *jsr = (JABBER_SEARCH_RESULT*)psr; - TCHAR *jid = psr->id ? psr->id : jsr->jid; - return AddToListByJID(jid, flags); + return AddToListByJID(psr->id, flags); } MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, MEVENT hDbEvent) @@ -683,17 +681,14 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) { Sleep(100); - JABBER_SEARCH_RESULT jsr = { 0 }; - jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT); - jsr.hdr.flags = PSR_TCHAR; - jsr.hdr.nick = jsb->jid; - jsr.hdr.firstName = _T(""); - jsr.hdr.lastName = _T(""); - jsr.hdr.id = jsb->jid; + PROTOSEARCHRESULT jsr = { 0 }; + jsr.cbSize = sizeof(jsr); + jsr.flags = PSR_TCHAR; + jsr.nick = jsb->jid; + jsr.firstName = _T(""); + jsr.lastName = _T(""); + jsr.id = jsb->jid; - _tcsncpy_s(jsr.jid, jsb->jid, _TRUNCATE); - - jsr.jid[SIZEOF(jsr.jid)-1] = '\0'; ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)jsb->hSearch, (LPARAM)&jsr); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)jsb->hSearch, 0); mir_free(jsb); -- cgit v1.2.3