From 8b151780697e8602c8064d032f86decdf581189b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Mar 2015 22:27:30 +0000 Subject: fix for event count during subs merge/split git-svn-id: http://svn.miranda-ng.org/main/trunk@12391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/dbcontacts.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins/Dbx_mdb') 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; } -- cgit v1.2.3