summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbcontacts.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-19 15:20:53 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-19 15:20:53 +0000
commitcf751286442fa9b4b4843ae1091625e6a6c7ba2d (patch)
treec5c76f649b8065018d4d1189c84a70b7ef090bc3 /plugins/Dbx_mdb/src/dbcontacts.cpp
parenta98fbb55e2701f6ba4348e90bdb110df667bc4a5 (diff)
dbx_lmdb: fixed writing settings; CryptoProvider selector; correct transactions revert
git-svn-id: http://svn.miranda-ng.org/main/trunk@16310 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbcontacts.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbcontacts.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp
index 554df02d9a..c9e549da8e 100644
--- a/plugins/Dbx_mdb/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdb/src/dbcontacts.cpp
@@ -258,6 +258,17 @@ void DBCachedContact::Advance(DWORD id, DBEvent &dbe)
}
}
+void DBCachedContact::Snapshot()
+{
+ memcpy(&tmp_dbc, &dbc, sizeof(dbc));
+}
+
+void DBCachedContact::Revert()
+{
+ memcpy(&dbc, &tmp_dbc, sizeof(dbc));
+ memset(&tmp_dbc, 0, sizeof(dbc));
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// initial cycle to fill the contacts' cache
@@ -266,7 +277,7 @@ void CDbxMdb::FillContacts()
LIST<DBCachedContact> arContacts(10);
txn_ptr trnlck(m_pMdbEnv);
- mdb_open(trnlck, "contacts", MDB_INTEGERKEY, &m_dbContacts);
+ //mdb_open(trnlck, "contacts", MDB_INTEGERKEY, &m_dbContacts);
{
cursor_ptr cursor(trnlck, m_dbContacts);