summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Db3x_mmap/src/dbevents.cpp5
-rw-r--r--plugins/Db3x_mmap/src/dbintf.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h2
-rw-r--r--plugins/Db3x_mmap/src/version.h2
4 files changed, 8 insertions, 3 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;
}
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp
index 3481ccccb0..e17dd576f2 100644
--- a/plugins/Db3x_mmap/src/dbintf.cpp
+++ b/plugins/Db3x_mmap/src/dbintf.cpp
@@ -94,6 +94,7 @@ CDb3Mmap::~CDb3Mmap()
DestroyHookableEvent(hContactDeletedEvent);
DestroyHookableEvent(hContactAddedEvent);
DestroyHookableEvent(hSettingChangeEvent);
+ DestroyHookableEvent(hEventMarkedRead);
DestroyHookableEvent(hEventAddedEvent);
DestroyHookableEvent(hEventDeletedEvent);
@@ -149,6 +150,7 @@ int CDb3Mmap::Load(bool bSkipInit)
hContactDeletedEvent = CreateHookableEvent(ME_DB_CONTACT_DELETED);
hContactAddedEvent = CreateHookableEvent(ME_DB_CONTACT_ADDED);
hSettingChangeEvent = CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED);
+ hEventMarkedRead = CreateHookableEvent(ME_DB_EVENT_MARKED_READ);
hEventAddedEvent = CreateHookableEvent(ME_DB_EVENT_ADDED);
hEventDeletedEvent = CreateHookableEvent(ME_DB_EVENT_DELETED);
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 633c7aa7f5..361c91dffa 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -267,7 +267,7 @@ public:
protected:
DWORD m_dwFileSize, m_dwMaxContactId;
- HANDLE hSettingChangeEvent, hContactDeletedEvent, hContactAddedEvent;
+ HANDLE hSettingChangeEvent, hContactDeletedEvent, hContactAddedEvent, hEventMarkedRead;
CRITICAL_SECTION m_csDbAccess;
diff --git a/plugins/Db3x_mmap/src/version.h b/plugins/Db3x_mmap/src/version.h
index ef422c81fb..d23bd34d4f 100644
--- a/plugins/Db3x_mmap/src/version.h
+++ b/plugins/Db3x_mmap/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 95
#define __RELEASE_NUM 0
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>