diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-30 21:32:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-30 21:32:23 +0000 |
commit | 44d6b953f94d5c34a2d50e12c7416aa9a2e19b70 (patch) | |
tree | c8e1c28234b52079e90e1569288b9c38a3ce2dce /protocols/JabberG/src/jabber_proto.cpp | |
parent | af10723abafc00db6a77edd299cea1fc7c6822ab (diff) |
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
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
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);
|