diff options
Diffstat (limited to 'plugins/Db3x_mmap')
-rw-r--r-- | plugins/Db3x_mmap/src/dbcache.cpp | 12 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.cpp | 9 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 4 |
3 files changed, 23 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index 8862c7192f..8fb1910caf 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -23,6 +23,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
+int CDb3Mmap::Load(bool bSkipInit)
+{
+ int res = CDb3Base::Load(bSkipInit);
+ if (res != ERROR_SUCCESS)
+ return res;
+
+ if (!bSkipInit)
+ return InitCrypt();
+
+ return 0;
+}
+
void CDb3Mmap::Map()
{
m_hMap = CreateFileMapping(m_hDbFile, NULL, PAGE_READWRITE, 0, m_dwFileSize, NULL);
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index caaa1e5a74..c4b7732b9f 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -91,6 +91,14 @@ CDb3Base::~CDb3Base() }
CloseHandle(m_hDbFile);
+ DestroyHookableEvent(hContactDeletedEvent);
+ DestroyHookableEvent(hContactAddedEvent);
+ DestroyHookableEvent(hSettingChangeEvent);
+
+ DestroyHookableEvent(hEventAddedEvent);
+ DestroyHookableEvent(hEventDeletedEvent);
+ DestroyHookableEvent(hEventFilterAddedEvent);
+
DeleteCriticalSection(&m_csDbAccess);
DestroyDbInstance(this);
@@ -117,7 +125,6 @@ int CDb3Base::Load(bool bSkipInit) if ( !bSkipInit) {
if (InitCache()) return 1;
if (InitModuleNames()) return 1;
- if (InitCrypt()) return 1;
m_bReadOnly = false;
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 80f1d32790..de26d64923 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -301,6 +301,8 @@ struct CDb3Mmap : public CDb3Base CDb3Mmap(const TCHAR* ptszFileName);
~CDb3Mmap();
+ int Load(bool bSkipInit);
+
protected:
virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName);
virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
@@ -311,7 +313,7 @@ protected: virtual int InitCache(void);
protected:
- PBYTE m_pNull;
+ PBYTE m_pNull;
void Map();
void ReMap(DWORD needed);
|