summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_accounts.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-07-13 14:21:03 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-07-13 14:21:03 +0000
commita39bed945be56898d2eee18830ee3060f71b8ccd (patch)
treedf3ee7704cb715dc1ab4a3b8d0fb3997aba500d2 /protocols/SkypeWeb/src/skype_accounts.cpp
parentee57d99782d0a3a789b673f13cfdf96e1a77de23 (diff)
SkypeWeb: More fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14550 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_accounts.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_accounts.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp
index afb741ac6a..c306668496 100644
--- a/protocols/SkypeWeb/src/skype_accounts.cpp
+++ b/protocols/SkypeWeb/src/skype_accounts.cpp
@@ -26,6 +26,7 @@ int CSkypeProto::CompareAccounts(const CSkypeProto *p1, const CSkypeProto *p2)
CSkypeProto* CSkypeProto::InitAccount(const char *protoName, const wchar_t *userName)
{
+ mir_cslock lck(accountsLock);
CSkypeProto *proto = new CSkypeProto(protoName, userName);
Accounts.insert(proto);
return proto;
@@ -33,6 +34,7 @@ CSkypeProto* CSkypeProto::InitAccount(const char *protoName, const wchar_t *user
int CSkypeProto::UninitAccount(CSkypeProto *proto)
{
+ mir_cslock lck(accountsLock);
Accounts.remove(proto);
delete proto;
return 0;
@@ -40,6 +42,7 @@ int CSkypeProto::UninitAccount(CSkypeProto *proto)
CSkypeProto* CSkypeProto::GetContactAccount(MCONTACT hContact)
{
+ mir_cslock lck(accountsLock);
for (int i = 0; i < Accounts.getCount(); i++)
if (mir_strcmpi(GetContactProto(hContact), Accounts[i]->m_szModuleName) == 0)
return Accounts[i];