diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-27 11:33:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-27 11:33:58 +0000 |
commit | 6a2ba9783386e94f4625d6ab1add2a0f0919edcc (patch) | |
tree | e0a803e089003d602091f7909b7b528698b68ff4 /src/mir_app | |
parent | f1f98fe541c790141fec87b943af535a943c7100 (diff) |
fix for hangup
git-svn-id: http://svn.miranda-ng.org/main/trunk@17337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index f3862b4140..cd6ca15c45 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -350,10 +350,26 @@ MIR_APP_DLL(int) Chat_Control(const char *szModule, const wchar_t *wszId, int iC return CallFunctionSync(stubRoomControl, ¶m);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// chat termination
+
+struct ChatTerminateParam
+{
+ const char *szModule;
+ const wchar_t *wszId;
+ bool bRemoveContact;
+};
+
+static INT_PTR __stdcall stubRoomTerminate(void *param)
+{
+ ChatTerminateParam *p = (ChatTerminateParam*)param;
+ return SM_RemoveSession(p->wszId, p->szModule, p->bRemoveContact);
+}
+
MIR_APP_DLL(int) Chat_Terminate(const char *szModule, const wchar_t *wszId, bool bRemoveContact)
{
- mir_cslock lck(csChat);
- return SM_RemoveSession(wszId, szModule, bRemoveContact);
+ ChatTerminateParam param = { szModule, wszId, bRemoveContact };
+ return CallFunctionSync(stubRoomTerminate, ¶m);
}
/////////////////////////////////////////////////////////////////////////////////////////
|