From d8aaa26f36075ac9cceb5e346b33a128c332abc3 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Thu, 14 Feb 2013 22:22:10 +0000 Subject: + Restored sendOwnerInfoRequest() function in legacy mode. (patch by ryo-oh-ki) git-svn-id: http://svn.miranda-ng.org/main/trunk@3607 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/stdpackets.cpp | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'protocols/IcqOscarJ/src') diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp index 1eb1e696a3..c90244bdc3 100644 --- a/protocols/IcqOscarJ/src/stdpackets.cpp +++ b/protocols/IcqOscarJ/src/stdpackets.cpp @@ -511,18 +511,31 @@ void CIcqProto::sendOwnerInfoRequest(void) { icq_packet packet; - cookie_directory_data *pCookieData = (cookie_directory_data*)SAFE_MALLOC(sizeof(cookie_directory_data)); - pCookieData->bRequestType = DIRECTORYREQUEST_INFOOWNER; + if (m_bLegacyFix) + { + cookie_fam15_data *pCookieData = (cookie_fam15_data*)SAFE_MALLOC(sizeof(cookie_fam15_data)); + pCookieData->bRequestType = REQUESTTYPE_OWNER; + DWORD dwCookie = AllocateCookie(CKT_FAMILYSPECIAL, 0, NULL, (void*)pCookieData); - DWORD dwCookie = AllocateCookie(CKT_DIRECTORY_QUERY, 0, NULL, (void*)pCookieData); - WORD wDataLen = getUINLen(m_dwLocalUIN) + 4; + packServIcqExtensionHeader(&packet, this, 6, 0x07D0, (WORD)dwCookie); + packLEWord(&packet, META_REQUEST_SELF_INFO); + packLEDWord(&packet, m_dwLocalUIN); + } + else + { + cookie_directory_data *pCookieData = (cookie_directory_data*)SAFE_MALLOC(sizeof(cookie_directory_data)); + pCookieData->bRequestType = DIRECTORYREQUEST_INFOOWNER; - packServIcqDirectoryHeader(&packet, this, wDataLen + 8, META_DIRECTORY_QUERY, DIRECTORY_QUERY_INFO, (WORD)dwCookie); - packWord(&packet, 0x03); // with interests (ICQ6 uses 2 at login) - packDWord(&packet, 0x01); - packWord(&packet, wDataLen); + DWORD dwCookie = AllocateCookie(CKT_DIRECTORY_QUERY, 0, NULL, (void*)pCookieData); + WORD wDataLen = getUINLen(m_dwLocalUIN) + 4; - packTLVUID(&packet, 0x32, m_dwLocalUIN, NULL); + packServIcqDirectoryHeader(&packet, this, wDataLen + 8, META_DIRECTORY_QUERY, DIRECTORY_QUERY_INFO, (WORD)dwCookie); + packWord(&packet, 0x03); // with interests (ICQ6 uses 2 at login) + packDWord(&packet, 0x01); + packWord(&packet, wDataLen); + + packTLVUID(&packet, 0x32, m_dwLocalUIN, NULL); + } sendServPacket(&packet); } -- cgit v1.2.3