From 69979c145ec7d6c843635aedd0dc57158ec866d1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 27 May 2012 19:56:57 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@201 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/inbox.cpp | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'protocols/GTalkExt') diff --git a/protocols/GTalkExt/inbox.cpp b/protocols/GTalkExt/inbox.cpp index 9317fbc6cf..dc556ddc6d 100644 --- a/protocols/GTalkExt/inbox.cpp +++ b/protocols/GTalkExt/inbox.cpp @@ -210,28 +210,28 @@ struct OPEN_URL_HEADER { HANDLE FindNetUserHandle(LPCSTR acc) { - IJabberInterface *ji = getJabberApi(acc); - if (!ji) return NULL; - - PBYTE m_psProto = *(PBYTE*)((PBYTE)ji + sizeof(*ji)); // see CJabberInterface in jabber_proto.h - - PHANDLE pResult = (PHANDLE)(m_psProto + // see CJabberProto in jabber_proto.h - sizeof(PVOID) + // skip vtable ptr - sizeof(PVOID) + // skip m_ThreadInfo - SIZE_OF_JABBER_OPTIONS); // skip m_options - - for (int i=0; i < 100; i++) { - __try { - if (GetNetlibHandleType(*pResult) == NLH_USER) - break; - } - __except (EXCEPTION_EXECUTE_HANDLER){ - } - pResult++; - } - - assert(GetNetlibHandleType(*pResult) == NLH_USER); - return *pResult; + IJabberInterface *ji = getJabberApi(acc); + if (!ji) return NULL; + + PBYTE m_psProto = *(PBYTE*)((PBYTE)ji + sizeof(*ji)); // see CJabberInterface in jabber_proto.h + + PHANDLE pResult = (PHANDLE)(m_psProto + // see CJabberProto in jabber_proto.h + sizeof(PVOID) + // skip vtable ptr + sizeof(PVOID) + // skip m_ThreadInfo + SIZE_OF_JABBER_OPTIONS); // skip m_options + + for (int i=0; i < 100; i++) { + __try { + if (GetNetlibHandleType(*pResult) == NLH_USER) + break; + } + __except (EXCEPTION_EXECUTE_HANDLER){ + } + pResult++; + } + + assert(GetNetlibHandleType(*pResult) == NLH_USER); + return *pResult; } unsigned __stdcall OpenUrlThread(OPEN_URL_HEADER* data) @@ -395,8 +395,8 @@ void OpenContactInbox(HANDLE hContact) __finally { free(url); } - } - __finally { - DBFreeVariant(&dbv); - } -} \ No newline at end of file + } + __finally { + DBFreeVariant(&dbv); + } +} -- cgit v1.2.3