summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_chatrooms.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-07-25 12:30:11 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-07-25 12:30:11 +0000
commitbc55bf103dc79145ddd24e93a8f96fc6e8cf46d7 (patch)
treef0a516758a31572a7a2d07f5b0d1d7b002428003 /protocols/SkypeWeb/src/skype_chatrooms.cpp
parentb92e4c685ca1bfa9d6168c4562013ebca306b79d (diff)
SkypeWeb: Closing dialogs on logout
git-svn-id: http://svn.miranda-ng.org/main/trunk@14682 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 353b6064ee..839a1191d0 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -179,16 +179,19 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
{
case 10: {
CSkypeInviteDlg dlg(this);
- if(!dlg.DoModal())
- {
- break;
- }
+
+ { mir_cslock lck(m_InviteDialogsLock); m_InviteDialogs.insert(&dlg); }
+
+ if(!dlg.DoModal()) break;
MCONTACT hContact = dlg.m_hContact;
if (hContact != NULL)
{
ptrA username(db_get_sa(hContact, m_szModuleName, SKYPE_SETTINGS_ID));
SendRequest(new InviteUserToChatRequest(m_szRegToken, chat_id, username, "User", m_szServer));
}
+
+ { mir_cslock lck(m_InviteDialogsLock); m_InviteDialogs.remove(&dlg); }
+
break;
}
case 20:
@@ -562,10 +565,14 @@ INT_PTR CSkypeProto::SvcCreateChat(WPARAM, LPARAM)
if (IsOnline())
{
CSkypeGCCreateDlg dlg(this);
+
+ { mir_cslock lck(m_GCCreateDialogsLock); m_GCCreateDialogs.insert(&dlg); }
+
if (!dlg.DoModal()) { return 1; }
SendRequest(new CreateChatroomRequest(m_szRegToken, dlg.m_ContactsList, ptrA(getStringA(SKYPE_SETTINGS_ID)), m_szServer));
-
+
+ { mir_cslock lck(m_GCCreateDialogsLock); m_GCCreateDialogs.remove(&dlg); }
return 0;
}
return 1;