summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Dbx_mdb/src/dbcontacts.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp
index 958f48676a..43296ff777 100644
--- a/plugins/Dbx_mdb/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdb/src/dbcontacts.cpp
@@ -171,8 +171,13 @@ BOOL CDbxMdb::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
insVal.ts = pKey->ts;
insVal.dwEventId = pKey->dwEventId;
mdb_put(trnlck, m_dbEventsSort, &key2, &data, 0);
+
+ ccMeta->dbc.dwEventCount++;
}
+ MDB_val keyc = { sizeof(int), &ccMeta->contactID }, datac = { sizeof(ccMeta->dbc), &ccMeta->dbc };
+ mdb_put(trnlck, m_dbContacts, &keyc, &datac, 0);
+
trnlck.commit();
return 0;
}
@@ -196,8 +201,13 @@ BOOL CDbxMdb::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
delVal.ts = pKey->ts;
delVal.dwEventId = pKey->dwEventId;
mdb_del(trnlck, m_dbEventsSort, &key2, &data);
+
+ ccMeta->dbc.dwEventCount--;
}
+ MDB_val keyc = { sizeof(int), &ccMeta->contactID }, datac = { sizeof(ccMeta->dbc), &ccMeta->dbc };
+ mdb_put(trnlck, m_dbContacts, &keyc, &datac, 0);
+
trnlck.commit();
return 0;
}