summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbevents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbevents.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbevents.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp
index 472ebcdd82..5610e90e2f 100644
--- a/plugins/Db3x_mmap/src/dbevents.cpp
+++ b/plugins/Db3x_mmap/src/dbevents.cpp
@@ -270,7 +270,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbei)
STDMETHODIMP_(BOOL) CDb3Mmap::MarkEventRead(MCONTACT contactID, HANDLE hDbEvent)
{
- mir_cslock lck(m_csDbAccess);
+ mir_cslockfull lck(m_csDbAccess);
DWORD ofsContact = GetContactOffset(contactID);
DBContact dbc = *(DBContact*)DBRead(ofsContact, sizeof(DBContact), NULL);
DBEvent *dbe = (DBEvent*)DBRead((DWORD)hDbEvent, sizeof(DBEvent), NULL);
@@ -302,6 +302,9 @@ STDMETHODIMP_(BOOL) CDb3Mmap::MarkEventRead(MCONTACT contactID, HANDLE hDbEvent)
}
DBWrite(ofsContact, &dbc, sizeof(DBContact));
DBFlush(0);
+
+ lck.unlock();
+ NotifyEventHooks(hEventMarkedRead, contactID, (LPARAM)hDbEvent);
return ret;
}