From 33953cc6a0fab6a91af293c6838f8a46dd7922da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 14:42:51 +0000 Subject: HCONTACT, part 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_misc.cpp | 2 +- protocols/Tlen/src/tlen_svc.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/Tlen/src') diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp index 670d014fc6..6aed4ecadc 100644 --- a/protocols/Tlen/src/tlen_misc.cpp +++ b/protocols/Tlen/src/tlen_misc.cpp @@ -63,7 +63,7 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick) cbBlob = sizeof(DWORD) + sizeof(HANDLE) + (int)strlen(nick) + (int)strlen(jid) + 5; pBlob = pCurBlob = (PBYTE) mir_alloc(cbBlob); *((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD); - *((PHANDLE)pCurBlob) = hContact; pCurBlob += sizeof(DWORD); + *((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD); strcpy((char *) pCurBlob, nick); pCurBlob += strlen(nick)+1; *pCurBlob = '\0'; pCurBlob++; //firstName *pCurBlob = '\0'; pCurBlob++; //lastName diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 034bfd0ea8..479026eb1b 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -219,7 +219,7 @@ HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr) HCONTACT hContact; TLEN_SEARCH_RESULT *jsr = (TLEN_SEARCH_RESULT*)psr; if (jsr->hdr.cbSize != sizeof(TLEN_SEARCH_RESULT)) - return (int) NULL; + return NULL; hContact = AddToListByJID(this, jsr->jid, flags); // wParam is flag e.g. PALF_TEMPORARY return hContact; } @@ -228,16 +228,16 @@ HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEven { DBEVENTINFO dbei = { sizeof(dbei) }; if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1)) - return (HANDLE) NULL; + return NULL; if ((dbei.pBlob=(PBYTE) mir_alloc(dbei.cbBlob)) == NULL) - return (HANDLE) NULL; + return NULL; if (db_event_get(hDbEvent, &dbei)) { mir_free(dbei.pBlob); - return (HANDLE) NULL; + return NULL; } if (strcmp(dbei.szModule, m_szModuleName)) { mir_free(dbei.pBlob); - return (HANDLE) NULL; + return NULL; } /* @@ -249,7 +249,7 @@ HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEven if (dbei.eventType != EVENTTYPE_AUTHREQUEST) { mir_free(dbei.pBlob); - return (HANDLE) NULL; + return NULL; } char *nick = (char *)dbei.pBlob + sizeof(DWORD)*2; -- cgit v1.2.3