summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbcheck.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-10-09 17:23:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-10-09 17:23:04 +0300
commit2828f80c86cf8bde114c7ba11bcce4b4d32e2af6 (patch)
tree7d8043ffd10dd1f931f78bffe6ad5e1b3261b4cd /plugins/Dbx_mdbx/src/dbcheck.cpp
parenta519d4617ed83a2167a693ae87934e56889fef05 (diff)
Dbx_mdbx: fix for new constants
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcheck.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbcheck.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcheck.cpp b/plugins/Dbx_mdbx/src/dbcheck.cpp
index 527e0dd9bb..c15b6aee4c 100644
--- a/plugins/Dbx_mdbx/src/dbcheck.cpp
+++ b/plugins/Dbx_mdbx/src/dbcheck.cpp
@@ -39,14 +39,14 @@ int CDbxMDBX::CheckEvents1(void)
if (pData->hContact != 0) {
auto *cc = m_cache->GetCachedContact(pData->hContact);
if (cc == nullptr) {
- mdbx_cursor_del(cursor, 0);
+ mdbx_cursor_del(cursor, MDBX_UPSERT);
cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong contact ID %d, deleting"), pData->hContact));
continue;
}
}
if (GetBlobSize(pData->hEvent) == -1) {
- mdbx_cursor_del(cursor, 0);
+ mdbx_cursor_del(cursor, MDBX_UPSERT);
cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong event ID %d:%08X, deleting"), pData->hContact, pData->hEvent));
continue;
}
@@ -68,7 +68,7 @@ int CDbxMDBX::CheckEvents2(void)
for (int ret = mdbx_cursor_get(cursor, &key, &data, MDBX_FIRST); ret == MDBX_SUCCESS; ret = mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT)) {
MEVENT hDbEvent = *(MEVENT *)data.iov_base;
if (GetBlobSize(hDbEvent) == -1) {
- mdbx_cursor_del(cursor, 0);
+ mdbx_cursor_del(cursor, MDBX_UPSERT);
cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event id with wrong event ID %08X, deleting"), hDbEvent));
continue;
}
@@ -93,7 +93,7 @@ int CDbxMDBX::CheckEvents3(void)
if (pKey->hContact) {
auto *cc = m_cache->GetCachedContact(pKey->hContact);
if (cc == nullptr) {
- mdbx_cursor_del(cursor, 0);
+ mdbx_cursor_del(cursor, MDBX_UPSERT);
cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned setting with wrong contact ID %08X, deleting"), pKey->hContact));
continue;
}