summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbevents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-18 18:46:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-18 18:46:26 +0000
commit78b61b8fbd46d1689267a1d8e7ca0f315cf73543 (patch)
treea6c2dcf2114c4e1159eccc8090bd2aaa52020a7e /plugins/Db3x_mmap/src/dbevents.cpp
parent3791ce0c509d1d7a64cbba67015db38f4db5404c (diff)
merge with trunk
git-svn-id: http://svn.miranda-ng.org/main/trunk@8167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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;
}