summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_functions.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-06-15 17:44:43 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-06-15 17:44:43 +0000
commit83ba72066d0c993e882ee617cad8bb0f47e960d3 (patch)
tree23b087e9bdeb1df4e7ebc4a5aff1a09e482009ff /protocols/MRA/src/Mra_functions.cpp
parent6e8322956fd985f1ce768f1b7917adc34a9ab236 (diff)
reverted mra code + lparam fix for nxsn
git-svn-id: http://svn.miranda-ng.org/main/trunk@4959 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index f7b5ab93a5..a10ebcbaae 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1081,17 +1081,20 @@ static void FakeThread(void* param)
mir_free(param);
}
-int CMraProto::ProtoBroadcastAckAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
+DWORD CMraProto::ProtoBroadcastAckAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam, size_t paramSize)
{
- ACKDATA ack = {0};
- ack.cbSize = sizeof(ACKDATA);
- ack.szModule = m_szModuleName;
- ack.hContact = hContact;
- ack.type = type;
- ack.result = hResult;
- ack.hProcess = hProcess;
- ack.lParam = lParam;
- return CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)&ack);
+ ACKDATA *ack = (ACKDATA *)::mir_calloc(sizeof(ACKDATA) + paramSize);
+ ack->cbSize = sizeof(ACKDATA);
+ ack->szModule = m_szModuleName;
+ ack->hContact = hContact;
+ ack->type = type;
+ ack->result = hResult;
+ ack->hProcess = hProcess;
+ ack->lParam = lParam;
+ if (paramSize)
+ memcpy(ack+1, (void*)lParam, paramSize);
+ mir_forkthread(FakeThread, ack);
+ return 0;
}
DWORD CMraProto::CreateBlobFromContact(HANDLE hContact, LPWSTR lpwszRequestReason, size_t dwRequestReasonSize, LPBYTE lpbBuff, size_t dwBuffSize, size_t *pdwBuffSizeRet)