summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbintf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index 01bbfe4fed..b4a13a78f3 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -101,17 +101,21 @@ int CDbxMdb::Load(bool bSkipInit)
MDB_val key = { sizeof(DWORD), &keyVal }, data;
if (mdb_get(trnlck, m_dbGlobal, &key, &data) == MDB_SUCCESS) {
DBHeader *hdr = (DBHeader*)data.mv_data;
- if (hdr->signature != DBHEADER_SIGNATURE)
+ if (hdr->dwSignature != DBHEADER_SIGNATURE)
DatabaseCorruption(NULL);
memcpy(&m_header, data.mv_data, sizeof(m_header));
}
else {
- m_header.signature = DBHEADER_SIGNATURE;
+ m_header.dwSignature = DBHEADER_SIGNATURE;
m_header.dwVersion = 1;
- m_header.eventCount = 0;
data.mv_data = &m_header; data.mv_size = sizeof(m_header);
mdb_put(trnlck, m_dbGlobal, &key, &data, 0);
+
+ keyVal = 0;
+ DBContact dbc = { DBCONTACT_SIGNATURE, 0, 0, 0 };
+ data.mv_data = &dbc; data.mv_size = sizeof(dbc);
+ mdb_put(trnlck, m_dbContacts, &key, &data, 0);
}
trnlck.commit();