summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbintf.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-04-24 13:40:50 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-04-24 13:40:50 +0000
commitc831d41181f53d00debc5c725459f90ce25716f2 (patch)
tree2f763de6a0c6890653c1b7fe838e4976d7ad2bc8 /plugins/Dbx_mdb/src/dbintf.cpp
parent0080cd035eaa00062b5f0f494be1e8862d8548b7 (diff)
dbx_lmdb: updated lmdb engine
git-svn-id: http://svn.miranda-ng.org/main/trunk@16761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index e129bbd600..a9c798d2a4 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -104,13 +104,15 @@ int CDbxMdb::Load(bool bSkipInit)
const DBHeader *hdr = (const DBHeader*)data.mv_data;
if (hdr->dwSignature != DBHEADER_SIGNATURE)
DatabaseCorruption(NULL);
+ if (hdr->dwVersion != DBHEADER_VERSION)
+ return EGROKPRF_OBSOLETE;
memcpy(&m_header, data.mv_data, sizeof(m_header));
}
else
{
m_header.dwSignature = DBHEADER_SIGNATURE;
- m_header.dwVersion = 1;
+ m_header.dwVersion = DBHEADER_VERSION;
data.mv_data = &m_header; data.mv_size = sizeof(m_header);
mdb_put(trnlck, m_dbGlobal, &key, &data, 0);