diff options
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;
}
|