diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-01 08:34:15 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-01 08:34:15 +0000 |
commit | d575132cdc94cf476fee70859aa673a31aba3ea4 (patch) | |
tree | 88ee7508e3a44d66d2e0ed78d9c519e574aacb60 /plugins/Dbx_mdb/src/dbcontacts.cpp | |
parent | cfc52e743a79a7ee49e577b72b2f8ed44017d221 (diff) |
dbx_lmdb: temporary crutch for fix events overwriting
git-svn-id: http://svn.miranda-ng.org/main/trunk@16381 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbcontacts.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp index 1ca1230f41..9b4775990c 100644 --- a/plugins/Dbx_mdb/src/dbcontacts.cpp +++ b/plugins/Dbx_mdb/src/dbcontacts.cpp @@ -339,9 +339,11 @@ void CDbxMdb::FillContacts() DBCachedContact *cc = arContacts[i];
CheckProto(cc, "");
- m_dwMaxContactId = cc->contactID+1;
+ m_dwMaxContactId = max(m_dwMaxContactId, cc->contactID+1);
m_contactCount++;
+ m_dwMaxEventId = max(m_dwMaxEventId, FindLastEvent(cc->contactID) + 1);
+
DBVARIANT dbv; dbv.type = DBVT_DWORD;
cc->nSubs = (0 != GetContactSetting(cc->contactID, META_PROTO, "NumContacts", &dbv)) ? -1 : dbv.dVal;
if (cc->nSubs != -1) {
|