diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-02 15:41:48 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-02 15:41:48 +0000 |
commit | 336401d1771d74771246ac7e3ec6e3b1e562a98e (patch) | |
tree | 1d6d0df96dec368e9af0b6feabd1637877e1cef4 /plugins/Dbx_mdb/src/dbevents.cpp | |
parent | 3ec4883a6f1dc06a030cd8e64ab6f519982ed1ce (diff) |
dbx_lmdb: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16392 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbevents.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbevents.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp index 927ca2598a..0367c9d025 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdb/src/dbevents.cpp @@ -247,7 +247,6 @@ void CDbxMdb::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSor cursor_ptr cursor(txn, m_dbEventsSort);
MDB_val key = { sizeof(key2), &key2 }, data;
- //key2.dwEventId++;
if (mdb_cursor_get(cursor, &key, &data, MDB_SET) == MDB_SUCCESS)
{
@@ -278,7 +277,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) mir_cslockfull lck(m_csDbAccess);
DWORD wRetVal = 0;
- for (;; Remap())
+ for (cc->Snapshot();; cc->Revert(), Remap())
{
txn_ptr txn(m_pMdbEnv);
@@ -303,7 +302,6 @@ STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) MDB_CHECK(mdb_put(txn, m_dbContacts, &key, &data, 0), -1);
wRetVal = dbe->flags;
-
if (txn.commit())
break;
}
|