summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcrypt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-07 14:08:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-07 14:08:15 +0000
commit7b8b7fa685ea5de62002d5637b4c34e19dfedeee (patch)
treee56c7f34d2470edc5cf40dea77d8e6ca0f6a17ac /plugins/Db3x_mmap/src/dbcrypt.cpp
parent7f2e5db6faeded54a61e9e1595d6d1596647db4d (diff)
- the internal DBContact structure extended to hold one more DWORD: contact ID;
- when called from dbchecker, mmap now refuses to check the old versions of database; - old classes hierarchy removed, all classes were merged into one due to the death of db3x & mmap_sa; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@8061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index 057438fd08..6e3207adf9 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -174,7 +174,7 @@ LBL_SetNewKey:
goto LBL_SetNewKey;
if (!EnterPassword(dbv.pbVal, iKeyLength)) { // password protected?
- if (m_dbHeader.version == DB_THIS_VERSION)
+ if (m_dbHeader.version >= DB_094_VERSION)
return 4;
// one of the early used version of mmap was replaced then by mmap_sa
@@ -193,11 +193,6 @@ LBL_SetNewKey:
WriteSignature(dbSignatureU);
}
- if (m_dbHeader.version == DB_OLD_VERSION) {
- m_dbHeader.version = DB_THIS_VERSION;
- DBWrite(sizeof(dbSignatureU), &m_dbHeader.version, sizeof(m_dbHeader.version));
- }
-
dbv.type = DBVT_BYTE;
if (!GetContactSetting(NULL, "CryptoEngine", "DatabaseEncryption", &dbv))
m_bEncrypted = dbv.bVal != 0;