diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-12 22:27:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-12 22:27:30 +0000 |
commit | 8b151780697e8602c8064d032f86decdf581189b (patch) | |
tree | dc3034ec9781f5e006c70852bcf8aaa80cb47cb7 /plugins/Dbx_mdb | |
parent | 75cff2d80be9ea6c5b946fbe59ef8bc56919f04d (diff) |
fix for event count during subs merge/split
git-svn-id: http://svn.miranda-ng.org/main/trunk@12391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb')
-rw-r--r-- | plugins/Dbx_mdb/src/dbcontacts.cpp | 10 |
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;
}
|