diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-22 15:11:48 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-22 15:11:48 +0000 |
commit | d2c91898a866006be4bd56b00e5cd36112ca5e06 (patch) | |
tree | 614d9d17e05739433fdbe68d247c5f199cdba019 /plugins/Dbx_mdb/src/dbcontacts.cpp | |
parent | ce1bf81b56ff2dad89b1f783d6377b20eebea0a4 (diff) |
dbx_lmdb: some fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@16522 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbcontacts.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp index e2c67c3981..c77eb3dfba 100644 --- a/plugins/Dbx_mdb/src/dbcontacts.cpp +++ b/plugins/Dbx_mdb/src/dbcontacts.cpp @@ -90,19 +90,16 @@ STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID) if (contactID == 0) // global contact cannot be removed
return 1;
- // delete
- // call notifier while outside mutex
NotifyEventHooks(hContactDeletedEvent, contactID, 0);
- mir_cslockfull lck(m_csDbAccess);
+ mir_cslock lck(m_csDbAccess);
{
- LIST<EventItem> events(50);
+ OBJLIST<EventItem> events(50);
GatherContactHistory(contactID, events);
while (events.getCount())
{
- DeleteEvent(contactID, events[0]->eventId);
- delete events[0];
+ DeleteEvent(contactID, events[0].eventId);
events.remove(0);
}
}
@@ -144,9 +141,6 @@ STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID) if (contactID == m_hLastCachedContact)
m_hLastCachedContact = NULL;
-
- lck.unlock();
-
return 0;
}
|