From 34215e3c3e8eaa5e1c4e6107a185a1821b51c0ce Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 16 Jul 2010 16:05:11 +0300 Subject: modified: commonheaders.h modified: init.cpp modified: utilities.cpp --- utilities.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utilities.cpp') diff --git a/utilities.cpp b/utilities.cpp index c21a919..87f4802 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -79,7 +79,7 @@ int HandleDbNewContact(WPARAM w, LPARAM l) { if(_tcsstr(_T(JUICK_JID), tmp)) { - if(!(*p)->hPrescenseHandler && !(*p)->hMessageHandler && !(*p)->hIqHandler) + if((*p)->hPrescenseHandler == INVALID_HANDLE_VALUE && (*p)->hMessageHandler == INVALID_HANDLE_VALUE && (*p)->hIqHandler == INVALID_HANDLE_VALUE) { IJabberNetInterface *ijnet = (*p)->JabberInterface->Net(); (*p)->hPrescenseHandler = ijnet->AddPresenceHandler((JABBER_HANDLER_FUNC)PrescenseHandler); @@ -104,7 +104,7 @@ int HandleDbContactDeleted(WPARAM w, LPARAM l) { if(_tcsstr(_T(JUICK_JID), tmp)) { - if((*p)->hPrescenseHandler && (*p)->hMessageHandler && (*p)->hIqHandler) + if((*p)->hPrescenseHandler != INVALID_HANDLE_VALUE && (*p)->hMessageHandler != INVALID_HANDLE_VALUE && (*p)->hIqHandler != INVALID_HANDLE_VALUE) { IJabberNetInterface *ijnet = (*p)->JabberInterface->Net(); ijnet->RemoveHandler((*p)->hPrescenseHandler); @@ -145,6 +145,8 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface *ji, HXML node, voi static JABBER_HANDLER_FUNC MessageHandler(IJabberInterface *ji, HXML node, void *pUserData) { + if(!_tcsstr(xi.getAttr(node, 0), _T(JUICK_JID))) + return FALSE; return FALSE; } -- cgit v1.2.3