summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbcrypt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-12-07 12:42:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-12-07 12:42:40 +0300
commit8343b85b097da18cc7d4b17e598f2d5a9003a7fe (patch)
tree026e2c362823835d1949c1b2b97ac5df12f05790 /plugins/Dbx_mdbx/src/dbcrypt.cpp
parent8a557bb6c7119e9a8d196d76e144727b1b861c1d (diff)
useless code removed
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcrypt.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbcrypt.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp
index e88e253b7d..2f8f10ce7e 100644
--- a/plugins/Dbx_mdbx/src/dbcrypt.cpp
+++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp
@@ -109,9 +109,6 @@ CRYPTO_PROVIDER* CDbxMDBX::SelectProvider()
key.iov_len = sizeof(DBKey_Crypto_IsEncrypted); key.iov_base = DBKey_Crypto_IsEncrypted; value.iov_len = sizeof(bool); value.iov_base = &bTotalCrypt;
if (mdbx_put(trnlck, m_dbCrypto, &key, &value, MDBX_UPSERT) != MDBX_SUCCESS)
return nullptr;
-
- if (trnlck.Commit() != MDBX_SUCCESS)
- return nullptr;
}
DBFlush();
@@ -264,8 +261,6 @@ void CDbxMDBX::StoreKey()
txn_ptr trnlck(this);
MDBX_val key = { DBKey_Crypto_Key, sizeof(DBKey_Crypto_Key) }, value = { pKey, iKeyLength };
int rc = mdbx_put(trnlck, m_dbCrypto, &key, &value, MDBX_UPSERT);
- if (rc == MDBX_SUCCESS)
- rc = trnlck.Commit();
/* FIXME: throw an exception */
assert(rc == MDBX_SUCCESS);
UNREFERENCED_PARAMETER(rc);
@@ -358,8 +353,6 @@ int CDbxMDBX::EnableEncryption(bool bEncrypted)
}
lstEvents.erase(lstEvents.begin(), lstEvents.begin()+portion);
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
while (lstEvents.size() > 0);
@@ -368,8 +361,6 @@ int CDbxMDBX::EnableEncryption(bool bEncrypted)
MDBX_val key = { DBKey_Crypto_IsEncrypted, sizeof(DBKey_Crypto_IsEncrypted) }, value = { &bEncrypted, sizeof(bool) };
if (mdbx_put(trnlck, m_dbCrypto, &key, &value, MDBX_UPSERT) != MDBX_SUCCESS)
return 1;
- if (trnlck.Commit() != MDBX_SUCCESS)
- return 1;
}
DBFlush();