summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbcontacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-22 19:18:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-22 19:18:14 +0300
commit4ea2523ec747335c4c915a38f2f73b5782711d24 (patch)
treebf4d022c24e966399a45d4a5da127e4b952deb35 /plugins/Dbx_mdbx/src/dbcontacts.cpp
parent7177ca3a70807f06746b5f753e786811cd98f90e (diff)
fix for broken contacts in mdbx
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcontacts.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbcontacts.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp
index 1b8a269026..e639ae1de3 100644
--- a/plugins/Dbx_mdbx/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp
@@ -216,16 +216,18 @@ void DBCachedContact::Revert()
void CDbxMDBX::FillContacts()
{
- LIST<DBCachedContact> arContacts(m_contactCount);
-
- txn_ptr_ro trnlck(m_txn);
- cursor_ptr_ro cursor(m_curContacts);
+ {
+ txn_ptr_ro trnlck(m_txn);
+ cursor_ptr_ro cursor(m_curContacts);
- MDBX_val key, data;
- while (mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT) == MDBX_SUCCESS) {
- DBCachedContact *cc = m_cache->AddContactToCache(*(MCONTACT*)key.iov_base);
- cc->dbc = *(DBContact*)data.iov_base;
+ MDBX_val key, data;
+ while (mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT) == MDBX_SUCCESS) {
+ DBCachedContact *cc = m_cache->AddContactToCache(*(MCONTACT*)key.iov_base);
+ cc->dbc = *(DBContact*)data.iov_base;
+ }
+ }
+ for (DBCachedContact *cc = m_cache->GetFirstContact(); cc; cc = m_cache->GetNextContact(cc->contactID)) {
CheckProto(cc, "");
DBVARIANT dbv; dbv.type = DBVT_DWORD;