diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-07 12:42:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-07 12:42:40 +0300 |
commit | 8343b85b097da18cc7d4b17e598f2d5a9003a7fe (patch) | |
tree | 026e2c362823835d1949c1b2b97ac5df12f05790 /plugins/Dbx_mdbx/src/dbcontacts.cpp | |
parent | 8a557bb6c7119e9a8d196d76e144727b1b861c1d (diff) |
useless code removed
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbcontacts.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index 1ae91069b2..47a23254c4 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -68,9 +68,6 @@ LONG CDbxMDBX::DeleteContact(MCONTACT contactID) mdbx_del(trnlck, m_dbEvents, &key2, nullptr);
}
}
-
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
// remove all contact's settings
@@ -90,9 +87,6 @@ LONG CDbxMDBX::DeleteContact(MCONTACT contactID) if (mdbx_cursor_del(cursor, MDBX_UPSERT) != MDBX_SUCCESS)
return 1;
}
-
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
// finally remove the contact itself
@@ -102,8 +96,6 @@ LONG CDbxMDBX::DeleteContact(MCONTACT contactID) txn_ptr trnlck(this);
if (mdbx_del(trnlck, m_dbContacts, &key, nullptr) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
// free cache item
@@ -124,8 +116,6 @@ MCONTACT CDbxMDBX::AddContact() txn_ptr trnlck(this);
if (mdbx_put(trnlck, m_dbContacts, &key, &data, MDBX_UPSERT) != MDBX_SUCCESS)
return 0;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 0;
}
DBFlush();
@@ -171,9 +161,6 @@ BOOL CDbxMDBX::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) if (mdbx_put(trnlck, m_dbEventsSort, &key, &data, MDBX_UPSERT) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
-
ccMeta->dbc.dwEventCount++;
}
{
@@ -182,8 +169,6 @@ BOOL CDbxMDBX::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) txn_ptr trnlck(this);
if (mdbx_put(trnlck, m_dbContacts, &keyc, &datac, MDBX_UPSERT) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
DBFlush();
@@ -203,8 +188,6 @@ BOOL CDbxMDBX::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) MDBX_val key = { &insVal, sizeof(insVal) };
if (mdbx_del(trnlck, m_dbEventsSort, &key, nullptr) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
ccMeta->dbc.dwEventCount--;
}
@@ -213,8 +196,6 @@ BOOL CDbxMDBX::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) MDBX_val keyc = { &ccMeta->contactID, sizeof(MCONTACT) }, datac = { &ccMeta->dbc, sizeof(ccMeta->dbc) };
if (mdbx_put(trnlck, m_dbContacts, &keyc, &datac, MDBX_UPSERT) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
DBFlush();
@@ -246,9 +227,6 @@ BOOL CDbxMDBX::MetaRemoveSubHistory(DBCachedContact *ccSub) if (mdbx_del(trnlck, m_dbEventsSort, &key, nullptr) != MDBX_SUCCESS)
return 1;
}
-
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
DBFlush();
|