summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbintfm.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-29 19:55:04 +0000
commit7e0c7c426f9c8a453deef09c3d6679824af5f3d5 (patch)
tree6e247cf898b38c430cf1924242177e91a02226a5 /plugins/Db3x_mmap/src/dbintfm.cpp
parent5dbf04acc4094bdf762bbadb71b7ab6024e09dd5 (diff)
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
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintfm.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbintfm.cpp17
1 files changed, 7 insertions, 10 deletions
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;
}