From 85b2965c47960606d39394f33ddb1909ce5926ac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Jun 2013 18:02:24 +0000 Subject: real fix for status messages in MRA :) git-svn-id: http://svn.miranda-ng.org/main/trunk@4960 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraProto.cpp | 2 +- protocols/MRA/src/Mra_functions.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols') diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index bc36693813..f8d847fae8 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -629,7 +629,7 @@ int CMraProto::SetStatus(int iNewStatus) } } MraSetContactStatus(NULL, m_iStatus); - ProtoBroadcastAckAsync(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)dwOldStatusMode, m_iStatus); + ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)dwOldStatusMode, m_iStatus); return 0; } diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index a10ebcbaae..c01f69cf8a 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1083,16 +1083,17 @@ static void FakeThread(void* param) DWORD CMraProto::ProtoBroadcastAckAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam, size_t paramSize) { - ACKDATA *ack = (ACKDATA *)::mir_calloc(sizeof(ACKDATA) + paramSize); + 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); + if (paramSize) { + ack->lParam = (LPARAM)(ack+1); + memcpy((void*)ack->lParam, (void*)lParam, paramSize); + } mir_forkthread(FakeThread, ack); return 0; } -- cgit v1.2.3