diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-15 18:02:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-15 18:02:24 +0000 |
commit | 85b2965c47960606d39394f33ddb1909ce5926ac (patch) | |
tree | e5e1f8302d913302ec30b73b9075dcb48c339d75 | |
parent | 83ba72066d0c993e882ee617cad8bb0f47e960d3 (diff) |
real fix for status messages in MRA :)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4960 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
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;
}
|