From 7e0c7c426f9c8a453deef09c3d6679824af5f3d5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Dec 2013 19:55:04 +0000 Subject: preparing mmap_sa, that it finally compatible with new mmap git-svn-id: http://svn.miranda-ng.org/main/trunk@7415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbintfm.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbintfm.cpp') diff --git a/plugins/Db3x_mmap/src/dbintfm.cpp b/plugins/Db3x_mmap/src/dbintfm.cpp index 352728299f..3dc1e91294 100644 --- a/plugins/Db3x_mmap/src/dbintfm.cpp +++ b/plugins/Db3x_mmap/src/dbintfm.cpp @@ -36,16 +36,13 @@ CDb3Mmap::~CDb3Mmap() free(m_pNull); } -DWORD CDb3Mmap::GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName) +int CDb3Mmap::Load(bool bSkipInit) { - DWORD ofsThis = dbc->ofsFirstSettings; - while (ofsThis) { - DBContactSettings *dbcs = (DBContactSettings*)DBRead(ofsThis,sizeof(DBContactSettings),NULL); - if (dbcs->signature != DBCONTACTSETTINGS_SIGNATURE) DatabaseCorruption(NULL); - if (dbcs->ofsModuleName == ofsModuleName) - return ofsThis; - - ofsThis = dbcs->ofsNext; + int res = CDb3Base::Load(bSkipInit); + if (!res) { + if (!bSkipInit) + if (InitCrypt()) return 1; } - return 0; + + return res; } -- cgit v1.2.3