From 50d176bfe78d4b5ffd829a874e503facef398e7d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 14 Sep 2018 16:33:56 +0300 Subject: merge with libmdbx release --- plugins/Dbx_mdbx/src/dbevents.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Dbx_mdbx/src') diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index fa808b9d0d..7083aa1d18 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -294,7 +294,7 @@ void CDbxMDBX::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSo MDBX_val key = { &key2, sizeof(key2) }, data; - for (int res = mdbx_cursor_get(cursor, &key, &data, MDBX_SET); res == MDBX_SUCCESS; res = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { + for (int res = mdbx_cursor_get(cursor, &key, &data, MDBX_SET_KEY); res == MDBX_SUCCESS; res = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) { const DBEvent *dbe = (const DBEvent*)data.iov_base; if (dbe->contactID != cc->contactID) break; @@ -465,7 +465,7 @@ STDMETHODIMP_(MEVENT) CDbxMDBX::FindNextEvent(MCONTACT contactID, MEVENT hDbEven MDBX_val key = { &keyVal, sizeof(keyVal) }, data; cursor_ptr_ro cursor(m_curEventsSort); - if (mdbx_cursor_get(cursor, &key, &data, MDBX_SET) != MDBX_SUCCESS) + if (mdbx_cursor_get(cursor, &key, nullptr, MDBX_SET) != MDBX_SUCCESS) return cc->t_evLast = 0; if (mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT) != MDBX_SUCCESS) @@ -506,7 +506,7 @@ STDMETHODIMP_(MEVENT) CDbxMDBX::FindPrevEvent(MCONTACT contactID, MEVENT hDbEven MDBX_val key = { &keyVal, sizeof(keyVal) }; cursor_ptr_ro cursor(m_curEventsSort); - if (mdbx_cursor_get(cursor, &key, &data, MDBX_SET) != MDBX_SUCCESS) + if (mdbx_cursor_get(cursor, &key, nullptr, MDBX_SET) != MDBX_SUCCESS) return cc->t_evLast = 0; if (mdbx_cursor_get(cursor, &key, &data, MDBX_PREV) != MDBX_SUCCESS) -- cgit v1.2.3