diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-27 14:05:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-27 14:05:47 +0000 |
commit | b5367ea79446f2b3158650ce999779da20ea44cb (patch) | |
tree | cda4bb41f96cf9f5ee684e6919229229724ac11b | |
parent | 125d5bac9e4e10a4ac585df5840199739f88df32 (diff) |
dbx_mmap to open unencrypted mmap_sa profiles
git-svn-id: http://svn.miranda-ng.org/main/trunk@7916 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Db3x_mmap/src/dbintfm.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbintfm.cpp b/plugins/Db3x_mmap/src/dbintfm.cpp index 83d113e70c..0af9c6d79a 100644 --- a/plugins/Db3x_mmap/src/dbintfm.cpp +++ b/plugins/Db3x_mmap/src/dbintfm.cpp @@ -39,10 +39,17 @@ CDb3Mmap::~CDb3Mmap() int CDb3Mmap::Load(bool bSkipInit)
{
int res = CDb3Base::Load(bSkipInit);
- if (!res && !bSkipInit)
- if (InitCrypt()) return 1;
+ if (res)
+ return res;
+
+ if (!memcmp(&m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature)))
+ memcpy(&m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature));
- return res;
+ if (!bSkipInit)
+ if (InitCrypt())
+ return EGROKPRF_CANTREAD;
+
+ return ERROR_SUCCESS;
}
int CDb3Mmap::PrepareCheck()
|