diff options
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbintf.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index 57374de534..521a317b79 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -121,13 +121,21 @@ int CDbxMdb::Load(bool bSkipInit) trnlck.commit();
{
+ MDB_val key, val;
+
mdb_txn_begin(m_pMdbEnv, nullptr, MDB_RDONLY, &m_txn);
mdb_cursor_open(m_txn, m_dbEvents, &m_curEvents);
+ mdb_cursor_get(m_curEvents, &key, &val, MDB_LAST);
+ m_dwMaxEventId = *(MEVENT*)key.mv_data + 1;
+
mdb_cursor_open(m_txn, m_dbEventsSort, &m_curEventsSort);
mdb_cursor_open(m_txn, m_dbSettings, &m_curSettings);
mdb_cursor_open(m_txn, m_dbModules, &m_curModules);
+
mdb_cursor_open(m_txn, m_dbContacts, &m_curContacts);
+ mdb_cursor_get(m_curContacts, &key, &val, MDB_LAST);
+ m_dwMaxContactId = *(DWORD*)key.mv_data + 1;
mdb_txn_reset(m_txn);
}
|