summaryrefslogtreecommitdiff
path: root/src/mir_app/src/chat_svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app/src/chat_svc.cpp')
-rw-r--r--src/mir_app/src/chat_svc.cpp20
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, &param);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// 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, &param);
}
/////////////////////////////////////////////////////////////////////////////////////////