diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-27 17:12:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-27 17:12:49 +0000 |
commit | 795fd3b5c0a366bd1455d4c0ae8a7d9bb474c348 (patch) | |
tree | ba6269dbf2f13a67c4fe7573f02dab93095b432c /protocols/MRA/Mra_functions.cpp | |
parent | 6c6a48a1ea97de81ded7062eae451db4fc13261b (diff) |
- mra is linked statically with zlib now;
- new simplified async acks mechanism;
git-svn-id: http://svn.miranda-ng.org/main/trunk@1686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/Mra_functions.cpp')
-rw-r--r-- | protocols/MRA/Mra_functions.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/protocols/MRA/Mra_functions.cpp b/protocols/MRA/Mra_functions.cpp index 8c195fc63c..18d575995c 100644 --- a/protocols/MRA/Mra_functions.cpp +++ b/protocols/MRA/Mra_functions.cpp @@ -1063,7 +1063,6 @@ BOOL CMraProto::GetContactFirstEMail(HANDLE hContact, BOOL bMRAOnly, LPSTR lpszR }
/////////////////////////////////////////////////////////////////////////////////////////
-//
void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode)
{
@@ -1080,9 +1079,23 @@ void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, szErrorText);
}
-DWORD CMraProto::ProtoBroadcastAckEx(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static void FakeThread(void* param)
+{
+ Sleep(100);
+ CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)param);
+ mir_free(param);
+}
+
+DWORD CMraProto::ProtoBroadcastAckAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
{
- ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam);
+ ACKDATA* ack = (ACKDATA*)mir_calloc(sizeof(ACKDATA));
+ ack->cbSize = sizeof(ACKDATA);
+ ack->szModule = m_szModuleName; ack->hContact = hContact;
+ ack->type = type; ack->result = hResult;
+ ack->hProcess = hProcess; ack->lParam = lParam;
+ mir_forkthread(FakeThread, ack);
return 0;
}
|