diff options
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r-- | protocols/IcqOscarJ/src/chan_04close.cpp | 10 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_01service.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_02location.cpp | 30 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_03buddy.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_04message.cpp | 12 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_0alookup.cpp | 8 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_13servclist.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_15icqserver.cpp | 86 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_avatar.cpp | 16 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_direct.cpp | 6 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_directmsg.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_filerequests.cpp | 6 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_filetransfer.cpp | 18 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 12 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.h | 1 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_xtraz.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/oscar_filetransfer.cpp | 76 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/utilities.cpp | 18 |
18 files changed, 150 insertions, 165 deletions
diff --git a/protocols/IcqOscarJ/src/chan_04close.cpp b/protocols/IcqOscarJ/src/chan_04close.cpp index 3c9ee46350..8158e2767c 100644 --- a/protocols/IcqOscarJ/src/chan_04close.cpp +++ b/protocols/IcqOscarJ/src/chan_04close.cpp @@ -219,7 +219,7 @@ void CIcqProto::handleSignonError(WORD wError) case 0x05: // Mismatch uin or password
case 0x06: // Internal Client error (bad input to authorizer)
case 0x07: // Invalid account
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
ZeroMemory(m_szPassword, sizeof(m_szPassword));
icq_LogFatalParam(LPGEN("Connection failed.\nYour ICQ number or password was rejected (%d)."), wError);
break;
@@ -231,7 +231,7 @@ void CIcqProto::handleSignonError(WORD wError) case 0x14: // Reservation map error
case 0x15: // Reservation link error
case 0x1A: // Reservation timeout
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
icq_LogFatalParam(LPGEN("Connection failed.\nThe server is temporarily unavailable (%d)."), wError);
break;
@@ -242,12 +242,12 @@ void CIcqProto::handleSignonError(WORD wError) case 0x18: // Reservation rate limit exceeded
case 0x1D: // Rate limit exceeded
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER);
icq_LogFatalParam(LPGEN("Connection failed.\nYou have connected too quickly,\nplease wait and retry 10 to 20 minutes later (%d)."), wError);
break;
case 0x1B: // You are using an older version of ICQ. Upgrade required
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPROTOCOL);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPROTOCOL);
icq_LogMessage(LOG_FATAL, LPGEN("Connection failed.\nThe server did not accept this client version."));
break;
@@ -302,7 +302,7 @@ void CIcqProto::handleRuntimeError(WORD wError) case 0x01:
{
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
icq_LogMessage(LOG_FATAL, LPGEN("You have been disconnected from the ICQ network because you logged on from another location using the same ICQ number."));
break;
}
diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp index c9f87e1e89..f78f6213fb 100644 --- a/protocols/IcqOscarJ/src/fam_01service.cpp +++ b/protocols/IcqOscarJ/src/fam_01service.cpp @@ -337,7 +337,7 @@ void CIcqProto::handleServiceFam(BYTE *pBuffer, WORD wBufferLength, snac_header if (wStatus == 2 || wStatus == 3)
{ // this is only the simplest solution, needs rate management to every section
- BroadcastAck(NULL, ICQACKTYPE_RATEWARNING, ACKRESULT_STATUS, (HANDLE)wClass, wStatus);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_RATEWARNING, ACKRESULT_STATUS, (HANDLE)wClass, wStatus);
if (wStatus == 2)
NetLog_Server("Rates #%u: Alert", wClass);
else
@@ -345,7 +345,7 @@ void CIcqProto::handleServiceFam(BYTE *pBuffer, WORD wBufferLength, snac_header }
else if (wStatus == 4)
{
- BroadcastAck(NULL, ICQACKTYPE_RATEWARNING, ACKRESULT_STATUS, (HANDLE)wClass, wStatus);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_RATEWARNING, ACKRESULT_STATUS, (HANDLE)wClass, wStatus);
NetLog_Server("Rates #%u: Clear", wClass);
}
}
diff --git a/protocols/IcqOscarJ/src/fam_02location.cpp b/protocols/IcqOscarJ/src/fam_02location.cpp index 9e1fdd2ad6..8aa2a56aa7 100644 --- a/protocols/IcqOscarJ/src/fam_02location.cpp +++ b/protocols/IcqOscarJ/src/fam_02location.cpp @@ -60,7 +60,7 @@ void CIcqProto::handleLocationFam(BYTE *pBuffer, WORD wBufferLength, snac_header {
if (FindCookie(pSnacHeader->dwRef, &hCookieContact, (void**)&pCookieData) && !getContactUin(hCookieContact) && pCookieData->bRequestType == REQUESTTYPE_PROFILE)
{
- BroadcastAck(hCookieContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hCookieContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
ReleaseCookie(pSnacHeader->dwRef);
}
@@ -183,19 +183,19 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie char *szEncoding = NULL;
// Get Profile encoding TLV
- - pTLV = pChain->getTLV(0x05, 1); - if (pTLV && (pTLV->wLen > 0)) - { - // store client capabilities - BYTE* capBuf = pTLV->pData; - WORD capLen = pTLV->wLen; - DBCONTACTWRITESETTING dbcws; - dbcws.value.type = DBVT_BLOB; - dbcws.value.cpbVal = capLen; - dbcws.value.pbVal = capBuf; - dbcws.szModule = m_szModuleName; - dbcws.szSetting = "CapBuf"; +
+ pTLV = pChain->getTLV(0x05, 1);
+ if (pTLV && (pTLV->wLen > 0))
+ {
+ // store client capabilities
+ BYTE* capBuf = pTLV->pData;
+ WORD capLen = pTLV->wLen;
+ DBCONTACTWRITESETTING dbcws;
+ dbcws.value.type = DBVT_BLOB;
+ dbcws.value.cpbVal = capLen;
+ dbcws.value.pbVal = capBuf;
+ dbcws.szModule = m_szModuleName;
+ dbcws.szSetting = "CapBuf";
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&dbcws);
}
else
@@ -224,7 +224,7 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie }
setSettingString(hContact, "About", szMsg);
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1 ,0);
SAFE_FREE((void**)&szMsg);
}
diff --git a/protocols/IcqOscarJ/src/fam_03buddy.cpp b/protocols/IcqOscarJ/src/fam_03buddy.cpp index 97cbc22653..a6b28d2d8f 100644 --- a/protocols/IcqOscarJ/src/fam_03buddy.cpp +++ b/protocols/IcqOscarJ/src/fam_03buddy.cpp @@ -758,7 +758,7 @@ void CIcqProto::parseStatusNote(DWORD dwUin, char *szUid, HANDLE hContact, oscar setStatusMsgVar(hContact, szStatusNote, false);
TCHAR* tszNote = mir_utf8decodeT(szStatusNote);
- BroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszNote);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, NULL, (LPARAM)tszNote);
mir_free(tszNote);
}
}
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp index ac3a7c9795..f4b39dd835 100644 --- a/protocols/IcqOscarJ/src/fam_04message.cpp +++ b/protocols/IcqOscarJ/src/fam_04message.cpp @@ -1238,7 +1238,7 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, WORD wLen, DWORD dwUin, cha if (hCookieContact != hContact)
NetLog_Server("Warning: Ack Contact does not match Cookie Contact(0x%x != 0x%x)", hContact, hCookieContact);
- BroadcastAck(hContact, ACKTYPE_CONTACTS, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_CONTACTS, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
ReleaseCookie(dwCookie);
}
@@ -2011,7 +2011,7 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp, }
NetLog_Server("Received SMS Mobile message");
- BroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SUCCESS, NULL, (LPARAM)szMsg);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SUCCESS, NULL, (LPARAM)szMsg);
break;
case MTYPE_STATUSMSGEXT:
@@ -2520,7 +2520,7 @@ void CIcqProto::handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD d {
filetransfer *ft = (filetransfer*)pReverse->ft;
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
NetLog_Server("Reverse Connect request failed");
// Set DC status to failed
@@ -2538,7 +2538,7 @@ void CIcqProto::handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD d if ((ackType == MTYPE_PLAIN && pCookieData && (pCookieData->nAckType == ACKTYPE_CLIENT)) || ackType != MTYPE_PLAIN)
{
- BroadcastAck(hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)(WORD)dwCookie, 0);
+ ProtoBroadcastAck(hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)(WORD)dwCookie, 0);
}
}
@@ -2684,7 +2684,7 @@ void CIcqProto::handleRecvServMsgError(BYTE *buf, WORD wLen, WORD wFlags, DWORD if (nMessageType != -1)
{
- BroadcastAck(hContact, nMessageType, ACKRESULT_FAILED, (HANDLE)(WORD)dwSequence, (LPARAM)pszErrorMessage);
+ ProtoBroadcastAck(hContact, nMessageType, ACKRESULT_FAILED, (HANDLE)(WORD)dwSequence, (LPARAM)pszErrorMessage);
}
else
{
@@ -2770,7 +2770,7 @@ void CIcqProto::handleServerAck(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwSeque break;
}
if (ackType != -1)
- BroadcastAck(hContact, ackType, ackRes, (HANDLE)(WORD)dwSequence, 0);
+ ProtoBroadcastAck(hContact, ackType, ackRes, (HANDLE)(WORD)dwSequence, 0);
if (pCookieData->bMessageType != MTYPE_FILEREQ)
SAFE_FREE((void**)&pCookieData); // this could be a bad idea, but I think it is safe
diff --git a/protocols/IcqOscarJ/src/fam_0alookup.cpp b/protocols/IcqOscarJ/src/fam_0alookup.cpp index da77295ecb..9e8c3c26f9 100644 --- a/protocols/IcqOscarJ/src/fam_0alookup.cpp +++ b/protocols/IcqOscarJ/src/fam_0alookup.cpp @@ -79,9 +79,9 @@ void CIcqProto::ReleaseLookupCookie(DWORD dwCookie, cookie_search *pCookie) else
{ // finish everything
if (pCookie->dwMainId)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)pCookie->dwMainId, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)pCookie->dwMainId, 0);
else // we are single
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
SAFE_FREE((void**)&pCookie);
}
@@ -116,9 +116,9 @@ void CIcqProto::handleLookupEmailReply(BYTE* buf, WORD wLen, DWORD dwCookie) sr.hdr.nick = sr.hdr.id;
// broadcast the result
if (pCookie->dwMainId)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)pCookie->dwMainId, (LPARAM)&sr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)pCookie->dwMainId, (LPARAM)&sr);
else
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)dwCookie, (LPARAM)&sr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)dwCookie, (LPARAM)&sr);
SAFE_FREE(&sr.hdr.id);
SAFE_FREE(&szUid);
}
diff --git a/protocols/IcqOscarJ/src/fam_13servclist.cpp b/protocols/IcqOscarJ/src/fam_13servclist.cpp index 05878accb7..d0f61d5e7c 100644 --- a/protocols/IcqOscarJ/src/fam_13servclist.cpp +++ b/protocols/IcqOscarJ/src/fam_13servclist.cpp @@ -749,7 +749,7 @@ void CIcqProto::handleServerCListAck(cookie_servlist_action* sc, WORD wError) }
case SSA_SERVLIST_ACK:
{
- BroadcastAck(sc->hContact, ICQACKTYPE_SERVERCLIST, wError?ACKRESULT_FAILED:ACKRESULT_SUCCESS, (HANDLE)sc->lParam, wError);
+ ProtoBroadcastAck(sc->hContact, ICQACKTYPE_SERVERCLIST, wError?ACKRESULT_FAILED:ACKRESULT_SUCCESS, (HANDLE)sc->lParam, wError);
break;
}
case SSA_IMPORT:
diff --git a/protocols/IcqOscarJ/src/fam_15icqserver.cpp b/protocols/IcqOscarJ/src/fam_15icqserver.cpp index 8d3fb6b7f9..723a42f68c 100644 --- a/protocols/IcqOscarJ/src/fam_15icqserver.cpp +++ b/protocols/IcqOscarJ/src/fam_15icqserver.cpp @@ -90,26 +90,26 @@ void CIcqProto::handleExtensionError(BYTE *buf, WORD wPackLen) {
HANDLE hContact;
cookie_fam15_data *pCookieData = NULL;
- int foundCookie;
- foundCookie = FindCookie(wCookie, &hContact, (void**)&pCookieData);
+ int foundCookie = FindCookie(wCookie, &hContact, (void**)&pCookieData);
if (foundCookie && pCookieData)
{
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
ReleaseCookie(wCookie); // we do not leak cookie and memory
}
NetLog_Server("Full info request error 0x%02x received", wErrorCode);
}
- else if (wSubType == META_SET_PASSWORD_REQ)
- { // failed to change user password, report to UI
- BroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
-
- NetLog_Server("Meta change password request failed, error 0x%02x", wErrorCode);
- }
- else
- NetLog_Server("Meta request error 0x%02x received", wErrorCode);
+ else if (wSubType == META_SET_PASSWORD_REQ)
+ {
+ // failed to change user password, report to UI
+ ProtoBroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
+
+ NetLog_Server("Meta change password request failed, error 0x%02x", wErrorCode);
+ }
+ else
+ NetLog_Server("Meta request error 0x%02x received", wErrorCode);
}
else
NetLog_Server("Meta request error 0x%02x received", wErrorCode);
@@ -228,7 +228,7 @@ void CIcqProto::handleExtensionMetaResponse(BYTE *databuf, WORD wPacketLen, WORD memcpy(pszInfo, databuf, wPacketLen);
pszInfo[wPacketLen] = 0;
- BroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_FAILED, (HANDLE)wCookie, (LPARAM)pszInfo);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_FAILED, (HANDLE)wCookie, (LPARAM)pszInfo);
FreeCookie(wCookie);
break;
}
@@ -261,7 +261,7 @@ void CIcqProto::handleExtensionMetaResponse(BYTE *databuf, WORD wPacketLen, WORD memcpy(pszInfo, databuf, wAckLen);
pszInfo[wAckLen] = 0;
- BroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SENTREQUEST, (HANDLE)wCookie, (LPARAM)pszInfo);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SENTREQUEST, (HANDLE)wCookie, (LPARAM)pszInfo);
FreeCookie(wCookie);
// Parsing success
@@ -326,7 +326,7 @@ void CIcqProto::ReleaseSearchCookie(DWORD dwCookie, cookie_search *pCookie) if (pCookie->dwStatus)
{
SAFE_FREE((void**)&pCookie);
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
}
else
pCookie->dwStatus = 1;
@@ -334,11 +334,11 @@ void CIcqProto::ReleaseSearchCookie(DWORD dwCookie, cookie_search *pCookie) else
{
SAFE_FREE((void**)&pCookie);
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
}
}
else
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
}
@@ -370,7 +370,7 @@ void CIcqProto::parseSearchReplies(unsigned char *databuf, WORD wPacketLen, WORD {
ICQSEARCHRESULT sr = {0};
DWORD dwUin;
- char szUin[UINMAXLEN];
+ char szUin[UINMAXLEN];
WORD wLen;
sr.hdr.cbSize = sizeof(sr);
@@ -391,8 +391,8 @@ void CIcqProto::parseSearchReplies(unsigned char *databuf, WORD wPacketLen, WORD unpackLEDWord(&databuf, &dwUin); // Uin
wPacketLen -= 4;
sr.uin = dwUin;
- _itoa(dwUin, szUin, 10);
- sr.hdr.id = (FNAMECHAR*)szUin;
+ _itoa(dwUin, szUin, 10);
+ sr.hdr.id = (FNAMECHAR*)szUin;
// Nick
if (wPacketLen < 2)
@@ -468,7 +468,7 @@ void CIcqProto::parseSearchReplies(unsigned char *databuf, WORD wPacketLen, WORD unpackByte(&databuf, &sr.auth);
// Finally, broadcast the result
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)wCookie, (LPARAM)&sr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)wCookie, (LPARAM)&sr);
// Broadcast "Last result" ack if this was the last user found
if (wReplySubtype == SRV_LAST_USER_FOUND)
@@ -519,9 +519,9 @@ void CIcqProto::parseUserInfoUpdateAck(unsigned char *databuf, WORD wPacketLen, case META_SET_PASSWORD_ACK: // Set user password server ack
if (bResultCode == 0xA)
- BroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
else
- BroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
FreeCookie(wCookie);
break;
@@ -676,9 +676,9 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR if (!bMoreDataFollows)
{
if (pCookieData->bRequestType == DIRECTORYREQUEST_INFOUSER)
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
else if (pCookieData->bRequestType == DIRECTORYREQUEST_SEARCH)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
ReleaseCookie(wCookie);
}
return;
@@ -697,9 +697,9 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR if (!bMoreDataFollows)
{
if (pCookieData->bRequestType == DIRECTORYREQUEST_INFOUSER)
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
else if (pCookieData->bRequestType == DIRECTORYREQUEST_SEARCH)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
ReleaseCookie(wCookie);
}
return;
@@ -726,9 +726,9 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR if (!bMoreDataFollows)
{
if (pCookieData->bRequestType == DIRECTORYREQUEST_INFOUSER)
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
else if (pCookieData->bRequestType == DIRECTORYREQUEST_SEARCH)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
ReleaseCookie(wCookie);
}
return;
@@ -746,7 +746,7 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR if (wData == 0 && pCookieData->bRequestType == DIRECTORYREQUEST_SEARCH)
{
NetLog_Server("Directory Search: No contacts found");
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
ReleaseCookie(wCookie);
return;
}
@@ -759,9 +759,9 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR if (!bMoreDataFollows)
{
if (pCookieData->bRequestType == DIRECTORYREQUEST_INFOUSER)
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1 ,0);
else if (pCookieData->bRequestType == DIRECTORYREQUEST_SEARCH)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0); // should report error here, but Find/Add module does not support that
ReleaseCookie(wCookie);
}
return;
@@ -1035,7 +1035,7 @@ void CIcqProto::parseDirectoryUserDetailsData(HANDLE hContact, oscar_tlv_chain * if (wReplySubType == META_DIRECTORY_RESPONSE)
if (pCookieData->bRequestType == DIRECTORYREQUEST_INFOUSER)
- BroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1 ,0);
+ ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1 ,0);
// Remove user from info update queue. Removing is fast so we always call this
// even if it is likely that the user is not queued at all.
@@ -1053,10 +1053,10 @@ void CIcqProto::parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCook NetLog_Server("Directory Search: Found user %s", szUid);
#endif
isr.hdr.cbSize = sizeof(ICQSEARCHRESULT);
- isr.hdr.flags = PSR_TCHAR;
- isr.hdr.id = ansi_to_tchar(szUid);
+ isr.hdr.flags = PSR_TCHAR;
+ isr.hdr.id = ansi_to_tchar(szUid);
- if (IsStringUIN(szUid))
+ if (IsStringUIN(szUid))
isr.uin = atoi(szUid);
else
isr.uin = 0;
@@ -1064,7 +1064,7 @@ void CIcqProto::parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCook SAFE_FREE(&szUid);
oscar_tlv *pTLV = cDetails->getTLV(0x50, 1);
- char *szData = NULL;
+ char *szData = NULL;
if (pTLV && pTLV->wLen > 0)
szData = cDetails->getString(0x50, 1); // Verified e-mail
@@ -1077,12 +1077,12 @@ void CIcqProto::parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCook szData = cDetails->getString(0x64, 1); // First Name
if (strlennull(szData))
isr.hdr.firstName = utf8_to_tchar(szData);
- SAFE_FREE(&szData);
+ SAFE_FREE(&szData);
szData = cDetails->getString(0x6E, 1); // Last Name
if (strlennull(szData))
isr.hdr.lastName = utf8_to_tchar(szData);
- SAFE_FREE(&szData);
+ SAFE_FREE(&szData);
szData = cDetails->getString(0x78, 1); // Nick
if (strlennull(szData))
@@ -1116,10 +1116,10 @@ void CIcqProto::parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCook isr.age = calcAgeFromBirthDate(cDetails->getDouble(0x1A4, 1));
// Finally, broadcast the result
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)dwCookie, (LPARAM)&isr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)dwCookie, (LPARAM)&isr);
// Release memory
- SAFE_FREE(&isr.hdr.id);
+ SAFE_FREE(&isr.hdr.id);
SAFE_FREE(&isr.hdr.nick);
SAFE_FREE(&isr.hdr.firstName);
SAFE_FREE(&isr.hdr.lastName);
@@ -1127,7 +1127,7 @@ void CIcqProto::parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCook // Search is over, broadcast final ack
if (wReplySubType == META_DIRECTORY_RESPONSE)
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)dwCookie, 0);
}
@@ -1174,7 +1174,7 @@ void CIcqProto::handleDirectoryUpdateResponse(BYTE *databuf, WORD wPacketLen, WO NetLog_Server("Error: Directory request failed, status %u", requestResult);
if (pCookieData->bRequestType == DIRECTORYREQUEST_UPDATEOWNER)
- BroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_FAILED, (HANDLE)wCookie, 0);
ReleaseCookie(wCookie);
return;
@@ -1187,7 +1187,7 @@ void CIcqProto::handleDirectoryUpdateResponse(BYTE *databuf, WORD wPacketLen, WO NetLog_Server("Warning: Data in error message present!");
if (pCookieData->bRequestType == DIRECTORYREQUEST_UPDATEOWNER)
- BroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SETINFO, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
if (wPacketLen == 0x18)
{
DWORD64 qwMetaTime;
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index 31edbd074b..31581e8fdb 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -605,7 +605,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Server("%s has removed Avatar.", strUID(dwUIN, szUID));
deleteSetting(hContact, "AvatarHash");
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
#ifdef _DEBUG
else
@@ -631,7 +631,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Hash(this, "new", pAvatarHash, cbAvatarHash);
#endif
setSettingBlob(hContact, "AvatarHash", pAvatarHash, cbAvatarHash);
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
else
{ // the file was lost, request avatar again
@@ -734,7 +734,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac setSettingBlob(hContact, "AvatarHash", pAvatarHash, cbAvatarHash);
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
if (bAutoLoad)
{ // auto-load is on, so request the avatar now, otherwise we are done
@@ -756,7 +756,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Server("%s has removed Avatar.", strUID(dwUIN, szUID));
deleteSetting(hContact, "AvatarHash");
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
#ifdef _DEBUG
else
@@ -1611,7 +1611,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, WORD wBufferLengt {
NetLog_Server("Received invalid avatar reply.");
- ppro->BroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
+ ppro->ProtoBroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
SAFE_FREE(&pCookieData->szFile);
SAFE_FREE((void**)&pCookieData->hash);
@@ -1698,7 +1698,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, WORD wBufferLengt }
}
- ppro->BroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
+ ppro->ProtoBroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
}
}
else
@@ -1726,14 +1726,14 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, WORD wBufferLengt ppro->m_avatarsQueue = ar;
}
}
- ppro->BroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
+ ppro->ProtoBroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
}
}
else
{ // the avatar is empty
NetLog_Server("Received empty avatar, nothing written (error 0x%x).", bResult);
- ppro->BroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
+ ppro->ProtoBroadcastAck(pCookieData->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
}
SAFE_FREE(&pCookieData->szFile);
SAFE_FREE((void**)&pCookieData->hash);
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp index db8a2dca33..ac016ba935 100644 --- a/protocols/IcqOscarJ/src/icq_direct.cpp +++ b/protocols/IcqOscarJ/src/icq_direct.cpp @@ -347,7 +347,7 @@ void __cdecl CIcqProto::icq_directThread( directthreadstartinfo *dtsi ) NetLog_Direct("connect() failed (%d)", GetLastError());
if (dc.type == DIRECTCONN_FILE)
{
- BroadcastAck(dc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, dc.ft, 0);
+ ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, dc.ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&dc.ft);
}
@@ -490,10 +490,10 @@ void __cdecl CIcqProto::icq_directThread( directthreadstartinfo *dtsi ) if (dc.ft->fileId != -1)
{
_close(dc.ft->fileId);
- BroadcastAck(dc.ft->hContact, ACKTYPE_FILE, dc.ft->dwBytesDone==dc.ft->dwTotalSize ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, dc.ft, 0);
+ ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, dc.ft->dwBytesDone==dc.ft->dwTotalSize ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, dc.ft, 0);
}
else if (dc.ft->hConnection)
- BroadcastAck(dc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, dc.ft, 0);
+ ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, dc.ft, 0);
SafeReleaseFileTransfer((void**)&dc.ft);
_chdir("\\"); /* so we don't leave a subdir handle open so it can't be deleted */
diff --git a/protocols/IcqOscarJ/src/icq_directmsg.cpp b/protocols/IcqOscarJ/src/icq_directmsg.cpp index 89fbb7cea5..ecf9f24af6 100644 --- a/protocols/IcqOscarJ/src/icq_directmsg.cpp +++ b/protocols/IcqOscarJ/src/icq_directmsg.cpp @@ -207,7 +207,7 @@ void CIcqProto::handleDirectMessage(directconnect* dc, PBYTE buf, WORD wLen) }
if (ackType != -1)
{ // was a good ack to broadcast ?
- BroadcastAck(dc->hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(dc->hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
ReleaseCookie(wCookie);
}
}
@@ -350,7 +350,7 @@ void CIcqProto::handleDirectGreetingMessage(directconnect* dc, PBYTE buf, WORD w if (ackType != -1)
{ // was a good ack to broadcast ?
- BroadcastAck(dc->hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(dc->hContact, ackType, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
}
// Release cookie
ReleaseCookie(wCookie);
diff --git a/protocols/IcqOscarJ/src/icq_filerequests.cpp b/protocols/IcqOscarJ/src/icq_filerequests.cpp index d466aaa0c6..2d426a5fb5 100644 --- a/protocols/IcqOscarJ/src/icq_filerequests.cpp +++ b/protocols/IcqOscarJ/src/icq_filerequests.cpp @@ -58,7 +58,7 @@ void CIcqProto::handleFileAck(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, if (wStatus != 0)
{
NetLog_Direct("File transfer denied by %u.", dwUin);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)ft, 0);
FreeCookie(dwCookie);
@@ -102,7 +102,7 @@ void CIcqProto::handleFileAck(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, NetLog_Direct("File transfer ack from %u, port %u, name %s, size %u", dwUin, ft->dwRemotePort, pszFileName, dwFileSize);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)ft, 0);
OpenDirectConnection(ft->hContact, DIRECTCONN_FILE, ft);
}
@@ -202,7 +202,7 @@ void CIcqProto::icq_CancelFileTransfer(HANDLE hContact, filetransfer* ft) { // Transfer still out there, end it
NetLib_CloseConnection(&ft->hConnection, FALSE);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
if (!FindFileTransferDC(ft))
{ // Release orphan structure only
diff --git a/protocols/IcqOscarJ/src/icq_filetransfer.cpp b/protocols/IcqOscarJ/src/icq_filetransfer.cpp index 48a567b1d9..54f58a0181 100644 --- a/protocols/IcqOscarJ/src/icq_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/icq_filetransfer.cpp @@ -95,7 +95,7 @@ static void file_sendNextFile(CIcqProto* ppro, directconnect* dc) if (dc->ft->iCurrentFile >= (int)dc->ft->dwFileCount)
{
- ppro->BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, dc->ft, 0);
+ ppro->ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, dc->ft, 0);
ppro->CloseDirectConnection(dc);
dc->ft->hConnection = NULL;
return;
@@ -155,7 +155,7 @@ static void file_sendNextFile(CIcqProto* ppro, directconnect* dc) SAFE_FREE(&szThisSubDirAnsi);
ppro->sendDirectPacket(dc, &packet);
- ppro->BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, dc->ft, 0);
+ ppro->ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, dc->ft, 0);
}
@@ -202,7 +202,7 @@ static void file_sendData(CIcqProto* ppro, directconnect* dc) PROTOFILETRANSFERSTATUS pfts;
file_buildProtoFileTransferStatus(dc->ft, &pfts);
- ppro->BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, dc->ft, (LPARAM)&pfts);
+ ppro->ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, dc->ft, (LPARAM)&pfts);
dc->ft->dwLastNotify = GetTickCount();
}
@@ -275,7 +275,7 @@ void CIcqProto::icq_sendFileResume(filetransfer *ft, int action, const char *szF file_sendResume(this, dc);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
}
@@ -346,7 +346,7 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, WORD wLen file_sendTransferSpeed(this, dc);
file_sendNick(this, dc);
}
- BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, dc->ft, 0);
+ ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, dc->ft, 0);
break;
case PEER_FILE_INIT_ACK:
@@ -424,7 +424,7 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, WORD wLen PROTOFILETRANSFERSTATUS pfts = {0};
file_buildProtoFileTransferStatus(dc->ft, &pfts);
- if (BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, dc->ft, (LPARAM)&pfts))
+ if (ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, dc->ft, (LPARAM)&pfts))
break; /* UI supports resume: it will call PS_FILERESUME */
dc->ft->fileId = OpenFileUtf(dc->ft->szThisFile, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE);
@@ -438,7 +438,7 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, WORD wLen }
}
file_sendResume(this, dc);
- BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, dc->ft, 0);
+ ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, dc->ft, 0);
break;
case PEER_FILE_RESUME:
@@ -491,7 +491,7 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, WORD wLen PROTOFILETRANSFERSTATUS pfts;
file_buildProtoFileTransferStatus(dc->ft, &pfts);
- BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, dc->ft, (LPARAM)&pfts);
+ ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, dc->ft, (LPARAM)&pfts);
dc->ft->dwLastNotify = GetTickCount();
}
if (wLen < 2048)
@@ -503,7 +503,7 @@ void CIcqProto::handleFileTransferPacket(directconnect* dc, PBYTE buf, WORD wLen if ((DWORD)dc->ft->iCurrentFile == dc->ft->dwFileCount - 1)
{
dc->type = DIRECTCONN_CLOSING; /* this guarantees that we won't accept any more data but that the sender is still free to closesocket() neatly */
- BroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, dc->ft, 0);
+ ProtoBroadcastAck(dc->ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, dc->ft, 0);
}
}
break;
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 29cc83d99a..9d388548ba 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -818,8 +818,8 @@ void CIcqProto::CheekySearchThread( void* ) }
isr.uin = cheekySearchUin;
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)cheekySearchId, (LPARAM)&isr);
- BroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)cheekySearchId, 0);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)cheekySearchId, (LPARAM)&isr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)cheekySearchId, 0);
cheekySearchId = -1;
}
@@ -1942,7 +1942,7 @@ int __cdecl CIcqProto::SetStatus(int iNewStatus) if (m_dwLocalUIN == 0)
{
SetCurrentStatus(ID_STATUS_OFFLINE);
- BroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
+ ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
icq_LogMessage(LOG_FATAL, LPGEN("You have not entered a ICQ number.\nConfigure this in Options->Network->ICQ and try again."));
return 0;
}
@@ -2029,7 +2029,7 @@ void __cdecl CIcqProto::GetAwayMsgThread( void *pStatusData ) setStatusMsgVar(pThreadData->hContact, pThreadData->szMessage, false);
TCHAR *tszMsg = mir_utf8decodeT(pThreadData->szMessage);
- BroadcastAck(pThreadData->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, pThreadData->hProcess, (LPARAM)tszMsg);
+ ProtoBroadcastAck(pThreadData->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, pThreadData->hProcess, (LPARAM)tszMsg);
mir_free(tszMsg);
SAFE_FREE(&pThreadData->szMessage);
@@ -2140,12 +2140,12 @@ int __cdecl CIcqProto::RecvAwayMsg( HANDLE hContact, int statusMode, PROTORECVEV setStatusMsgVar(hContact, evt->szMessage, false);
TCHAR* pszMsg = mir_utf8decodeT(evt->szMessage);
- BroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, (LPARAM)pszMsg);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, (LPARAM)pszMsg);
mir_free(pszMsg);
}
else {
setStatusMsgVar(hContact, evt->szMessage, true);
- BroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, (LPARAM)(TCHAR*)_A2T(evt->szMessage));
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, (LPARAM)(TCHAR*)_A2T(evt->szMessage));
}
return 0;
}
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h index 81d15edf0e..a7f7ce8994 100644 --- a/protocols/IcqOscarJ/src/icq_proto.h +++ b/protocols/IcqOscarJ/src/icq_proto.h @@ -892,7 +892,6 @@ struct CIcqProto : public PROTO_INTERFACE int StringToListItemId(const char *szSetting,int def);
//----| utilities.cpp |---------------------------------------------------------------
- int BroadcastAck(HANDLE hContact,int type,int result,HANDLE hProcess,LPARAM lParam);
char* ConvertMsgToUserSpecificAnsi(HANDLE hContact, const char* szMsg);
char* GetUserStoredPassword(char *szBuffer, int cbSize);
diff --git a/protocols/IcqOscarJ/src/icq_xtraz.cpp b/protocols/IcqOscarJ/src/icq_xtraz.cpp index be851f35d6..c616dffd0e 100644 --- a/protocols/IcqOscarJ/src/icq_xtraz.cpp +++ b/protocols/IcqOscarJ/src/icq_xtraz.cpp @@ -203,7 +203,7 @@ void CIcqProto::handleXtrazNotifyResponse(DWORD dwUin, HANDLE hContact, WORD wCo NetLog_Server("Response: %s", szRes);
#endif
- BroadcastAck(hContact, ICQACKTYPE_XTRAZNOTIFY_RESPONSE, ACKRESULT_SUCCESS, (HANDLE)wCookie, (LPARAM)szRes);
+ ProtoBroadcastAck(hContact, ICQACKTYPE_XTRAZNOTIFY_RESPONSE, ACKRESULT_SUCCESS, (HANDLE)wCookie, (LPARAM)szRes);
NextVal:
szNode = strstrnull(szRes, "<val srv_id=");
@@ -265,7 +265,7 @@ NextVal: setSettingStringUtf(hContact, DBSETTING_XSTATUS_MSG, szXMsg);
SAFE_FREE(&szXMsg);
}
- BroadcastAck(hContact, ICQACKTYPE_XSTATUS_RESPONSE, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
+ ProtoBroadcastAck(hContact, ICQACKTYPE_XSTATUS_RESPONSE, ACKRESULT_SUCCESS, (HANDLE)wCookie, 0);
}
else
{
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index 1352f6918f..479002e2ab 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -608,7 +608,7 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *sz }
else
{ // Just sanity
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&ft);
}
@@ -683,7 +683,7 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *sz {
NetLog_Server("OFT: File transfer cancelled by %s", strUID(dwUin, szUID));
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
// Notify user, that the FT was cancelled // TODO: new ACKRESULT_?
icq_LogMessage(LOG_ERROR, LPGEN("The file transfer was aborted by the other user."));
// Release transfer
@@ -747,7 +747,7 @@ void CIcqProto::handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, cha { // FT denied (icq5)
NetLog_Server("OFT: File transfer denied by %s", strUID(dwUin, szUID));
- BroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)oft, 0);
+ ProtoBroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)oft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oft);
}
@@ -757,7 +757,7 @@ void CIcqProto::handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, cha {
icq_LogMessage(LOG_ERROR, LPGEN("The file transfer failed: Proxy error"));
- BroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
+ ProtoBroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oft);
}
@@ -767,7 +767,7 @@ void CIcqProto::handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, cha {
icq_LogMessage(LOG_ERROR, LPGEN("The file transfer failed: Invalid request"));
- BroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
+ ProtoBroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oft);
}
@@ -777,7 +777,7 @@ void CIcqProto::handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, cha {
icq_LogMessage(LOG_ERROR, LPGEN("The file transfer failed: Proxy unavailable"));
- BroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
+ ProtoBroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oft);
}
@@ -787,7 +787,7 @@ void CIcqProto::handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, cha {
NetLog_Server("OFT: Uknown request response code 0x%x", wStatus);
- BroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
+ ProtoBroadcastAck(oft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)oft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oft);
}
@@ -887,7 +887,7 @@ HANDLE CIcqProto::oftInitTransfer(HANDLE hContact, DWORD dwUin, char* szUid, con { // found no valid files to send
icq_LogMessage(LOG_ERROR, LPGEN("Failed to Initialize File Transfer. No valid files were specified."));
// Notify UI
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&ft);
@@ -902,7 +902,7 @@ HANDLE CIcqProto::oftInitTransfer(HANDLE hContact, DWORD dwUin, char* szUid, con { // file larger than 4GB can be send only as single
icq_LogMessage(LOG_ERROR, LPGEN("The files are too big to be sent at once. Files bigger than 4GB can be sent only separately."));
// Notify UI
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&ft);
@@ -1076,7 +1076,7 @@ DWORD CIcqProto::oftFileCancel(HANDLE hContact, HANDLE hTransfer) oft_sendFileCancel(dwUin, szUid, ft);
- BroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
// Release structure
SafeReleaseFileTransfer((void**)&ft);
@@ -1145,7 +1145,7 @@ void CIcqProto::oftFileResume(oscar_filetransfer *ft, int action, const TCHAR *s #endif
icq_LogMessage(LOG_ERROR, LPGEN("Your file receive has been aborted because Miranda could not open the destination file in order to write to it. You may be trying to save to a read-only folder."));
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oc->ft);
return;
@@ -1183,7 +1183,7 @@ void CIcqProto::oftFileResume(oscar_filetransfer *ft, int action, const TCHAR *s sendOFT2FramePacket(oc, OFT_TYPE_READY);
}
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
if (!ft->qwThisFileSize || action == FILERESUME_SKIP)
{ // if the file is empty we will not receive any data
@@ -1250,7 +1250,7 @@ int CIcqProto::CreateOscarProxyConnection(oscar_connection *oc) NETLIBOPENCONNECTION nloc = {0};
// inform UI
- BroadcastAck(oc->ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTPROXY, oc->ft, 0);
+ ProtoBroadcastAck(oc->ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTPROXY, oc->ft, 0);
nloc.szHost = OSCAR_PROXY_HOST;
nloc.wPort = getSettingWord(NULL, "OscarPort", m_bSecureConnection ? DEFAULT_SERVER_PORT_SSL : DEFAULT_SERVER_PORT);
@@ -1339,7 +1339,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) addr.S_un.S_addr = htonl(oc.ft->dwRemoteInternalIP);
// Inform UI that we will attempt to connect
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, oc.ft, 0);
if (!addr.S_un.S_addr && oc.type == OCT_NORMAL)
{ // IP to connect to is empty, request reverse
@@ -1349,7 +1349,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) { // we got listening port, fine send request
oc.ft->listener = listener;
// notify UI
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, oc.ft, 0);
oft_sendFileRedirect(oc.dwUin, oc.szUid, oc.ft, oc.dwLocalInternalIP, listener->wPort, FALSE);
return;
@@ -1382,7 +1382,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) { // we got listening port, fine send request
oc.ft->listener = listener;
// notify UI that we await connection
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_LISTENING, oc.ft, 0);
oft_sendFileRedirect(oc.dwUin, oc.szUid, oc.ft, oc.dwLocalInternalIP, listener->wPort, FALSE);
return;
@@ -1403,7 +1403,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) // acknowledge OFT - connection is ready
oft_sendFileAccept(oc.dwUin, oc.szUid, oc.ft);
// signal UI
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, oc.ft, 0);
}
}
else
@@ -1424,7 +1424,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) IN_ADDR addr = {0};
// inform UI that we will connect to file proxy
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTPROXY, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTPROXY, oc.ft, 0);
addr.S_un.S_addr = htonl(oc.ft->dwProxyIP);
nloc.szHost = inet_ntoa(addr);
@@ -1436,7 +1436,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) oc.hConnection = NetLib_OpenConnection(m_hServerNetlibUser, "Proxy ", &nloc);
if (!oc.hConnection)
{ // proxy connection failed, we are out of possibilities
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
// notify the other side, that we failed
oft_sendFileResponse(oc.dwUin, oc.szUid, oc.ft, 0x04);
// Release structure
@@ -1454,7 +1454,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) {
oft_sendFileResponse(oc.dwUin, oc.szUid, oc.ft, 0x06);
// notify UI
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
// Release structure
SafeReleaseFileTransfer((void**)&oc.ft);
return;
@@ -1465,7 +1465,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) { // stage 4
if (!CreateOscarProxyConnection(&oc))
{ // proxy connection failed, we are out of possibilities
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
// notify the other side, that we failed
oft_sendFileResponse(oc.dwUin, oc.szUid, oc.ft, 0x06);
// Release structure
@@ -1493,7 +1493,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) }
if (oc.status != OCS_PROXY)
{ // Connected, notify FT UI
- BroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, oc.ft, 0);
+ ProtoBroadcastAck(oc.ft->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, oc.ft, 0);
// send init OFT frame - just for different order of packets (just like Trillian)
if (oc.status == OCS_CONNECTED && (oc.ft->flags & OFTF_SENDING) && ((oc.ft->flags & OFTF_INITIALIZED) || oc.type == OCT_REVERSE) && !(oc.ft->flags & OFTF_FILE_REQUEST_SENT))
@@ -1567,7 +1567,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) {
if (oc.status == OCS_DATA)
{
- BroadcastAck(oc.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
+ ProtoBroadcastAck(oc.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
icq_LogMessage(LOG_ERROR, LPGEN("Connection lost during file transfer."));
// Release structure
@@ -1575,7 +1575,7 @@ void __cdecl CIcqProto::oft_connectionThread( oscarthreadstartinfo *otsi ) }
else if (oc.status == OCS_NEGOTIATION)
{
- BroadcastAck(oc.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
+ ProtoBroadcastAck(oc.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc.ft, 0);
icq_LogMessage(LOG_ERROR, LPGEN("File transfer negotiation failed for unknown reason."));
// Release structure
@@ -1717,7 +1717,7 @@ int CIcqProto::oft_handleProxyData(oscar_connection *oc, BYTE *buf, int len) NetLog_Server("Proxy Error: %s (0x%x)", szError, wError);
// Notify UI
- BroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc->ft, 0);
+ ProtoBroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, oc->ft, 0);
// Release structure
SafeReleaseFileTransfer((void**)&oc->ft);
}
@@ -1739,7 +1739,7 @@ int CIcqProto::oft_handleProxyData(oscar_connection *oc, BYTE *buf, int len) oft_sendFileRequest(oc->dwUin, oc->szUid, ft, ft->szThisFile, 0);
SAFE_FREE(&ft->szThisFile);
// Notify UI
- BroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, oc->ft, 0);
+ ProtoBroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, oc->ft, 0);
}
else
{
@@ -1752,7 +1752,7 @@ int CIcqProto::oft_handleProxyData(oscar_connection *oc, BYTE *buf, int len) case 0x05: // Connection ready
oc->status = OCS_CONNECTED; // connection ready to send packets
// Notify UI
- BroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, oc->ft, 0);
+ ProtoBroadcastAck(oc->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, oc->ft, 0);
// signal we are ready
if (oc->type == OCT_PROXY_RECV)
{
@@ -1814,7 +1814,7 @@ int CIcqProto::oft_handleFileData(oscar_connection *oc, BYTE *buf, int len) PROTOFILETRANSFERSTATUS pfts;
oft_buildProtoFileTransferStatus(ft, &pfts);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&pfts);
ft->dwLastNotify = GetTickCount();
}
if (ft->qwFileBytesDone == ft->qwThisFileSize)
@@ -1853,7 +1853,7 @@ int CIcqProto::oft_handleFileData(oscar_connection *oc, BYTE *buf, int len) sendOFT2FramePacket(oc, OFT_TYPE_DONE);
oc->type = OCT_CLOSING;
NetLog_Direct("File Transfer completed successfully.");
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&ft);
}
@@ -2048,7 +2048,7 @@ void CIcqProto::handleOFT2FramePacket(oscar_connection *oc, WORD datatype, BYTE PROTOFILETRANSFERSTATUS pfts;
oft_buildProtoFileTransferStatus(ft, &pfts);
- if (BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, ft, (LPARAM)&pfts))
+ if (ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, ft, (LPARAM)&pfts))
{
oc->status = OCS_WAITING;
break; /* UI supports resume: it will call PS_FILERESUME */
@@ -2065,7 +2065,7 @@ void CIcqProto::handleOFT2FramePacket(oscar_connection *oc, WORD datatype, BYTE #endif
icq_LogMessage(LOG_ERROR, LPGEN("Your file receive has been aborted because Miranda could not open the destination file in order to write to it. You may be trying to save to a read-only folder."));
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oc->ft);
return;
@@ -2076,7 +2076,7 @@ void CIcqProto::handleOFT2FramePacket(oscar_connection *oc, WORD datatype, BYTE ft->flags |= OFTF_FILE_RECEIVING;
sendOFT2FramePacket(oc, OFT_TYPE_READY);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
if (!ft->qwThisFileSize)
{ // if the file is empty we will not receive any data
BYTE buf;
@@ -2163,7 +2163,7 @@ void CIcqProto::handleOFT2FramePacket(oscar_connection *oc, WORD datatype, BYTE // Prepare to receive data
oc->status = OCS_DATA;
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
// Ready for receive
sendOFT2FramePacket(oc, OFT_TYPE_RESUMEACK);
@@ -2298,7 +2298,7 @@ void CIcqProto::oft_sendFileData(oscar_connection *oc) PROTOFILETRANSFERSTATUS pfts;
oft_buildProtoFileTransferStatus(ft, &pfts);
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&pfts);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&pfts);
ft->dwLastNotify = GetTickCount();
}
}
@@ -2314,7 +2314,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) // prepare init frame
if (ft->iCurrentFile >= (int)ft->wFilesCount)
{ // All files done, great!
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oc->ft);
return;
@@ -2326,7 +2326,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) {
icq_LogMessage(LOG_ERROR, LPGEN("Your file transfer has been aborted because one of the files that you selected to send is no longer readable from the disk. You may have deleted or moved it."));
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oc->ft);
return;
@@ -2347,7 +2347,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) pszThisFileName[i] = 0x01;
}
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
ft->fileId = OpenFileUtf(ft->szThisFile, _O_BINARY | _O_RDONLY, 0);
#ifdef _DEBUG
@@ -2361,7 +2361,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) SAFE_FREE((void**)&pszThisFileName);
icq_LogMessage(LOG_ERROR, LPGEN("Your file transfer has been aborted because one of the files that you selected to send is no longer readable from the disk. You may have deleted or moved it."));
//
- BroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
// Release transfer
SafeReleaseFileTransfer((void**)&oc->ft);
return;
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index 633e798259..593fa6408c 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -1067,7 +1067,7 @@ void __cdecl CIcqProto::ProtocolAckThread(icq_ack_args* pArguments) else if (pArguments->nAckResult == ACKRESULT_FAILED)
NetLog_Server("Message delivery failed");
- BroadcastAck(pArguments->hContact, pArguments->nAckType, pArguments->nAckResult, pArguments->hSequence, pArguments->pszMessage);
+ ProtoBroadcastAck(pArguments->hContact, pArguments->nAckType, pArguments->nAckResult, pArguments->hSequence, pArguments->pszMessage);
SAFE_FREE((void**)(char **)&pArguments->pszMessage);
SAFE_FREE((void**)&pArguments);
@@ -1090,7 +1090,7 @@ void CIcqProto::SetCurrentStatus(int nStatus) int nOldStatus = m_iStatus;
m_iStatus = nStatus;
- BroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, nStatus);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, nStatus);
}
@@ -1794,20 +1794,6 @@ int CIcqProto::NetLog_Uni(BOOL bDC, const char *fmt,...) return CallService(MS_NETLIB_LOG,(WPARAM)hNetlib,(LPARAM)szText);
}
-int CIcqProto::BroadcastAck(HANDLE hContact,int type,int result,HANDLE hProcess,LPARAM lParam)
-{
- ACKDATA ack={0};
-
- ack.cbSize = sizeof(ACKDATA);
- ack.szModule = m_szModuleName;
- ack.hContact = hContact;
- ack.type = type;
- ack.result = result;
- ack.hProcess = hProcess;
- ack.lParam = lParam;
- return CallService(MS_PROTO_BROADCASTACK,0,(LPARAM)&ack);
-}
-
char* __fastcall ICQTranslateUtf(const char *src)
{ // this takes UTF-8 strings only!!!
char *szRes = NULL;
|