summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbmodulechain.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-23 16:58:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-23 16:58:35 +0300
commit6a6b08bfbdc3d77874b72ccb4b99cc50c6b8397b (patch)
tree5c0db265d88d596bb0644370f49c84135f0143b4 /plugins/Dbx_mdbx/src/dbmodulechain.cpp
parent57b7c931f578057739f014734257ed8e6b21713f (diff)
fixes #1195 (Import from mdbx is broken)
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbmodulechain.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbmodulechain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
index c133426350..daaaf494ff 100644
--- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
@@ -44,10 +44,10 @@ uint32_t CDbxMDBX::GetModuleID(const char *szName)
if (m_Modules.find(iHash) == m_Modules.end()) {
MDBX_val key = { &iHash, sizeof(iHash) }, data = { (void*)szName, strlen(szName) + 1 };
{
- txn_ptr txn(m_env);
- if (mdbx_put(txn, m_dbModules, &key, &data, 0) != MDBX_SUCCESS)
+ txn_ptr trnlck(StartTran());
+ if (mdbx_put(trnlck, m_dbModules, &key, &data, 0) != MDBX_SUCCESS)
return -1;
- if (txn.commit() != MDBX_SUCCESS)
+ if (trnlck.commit() != MDBX_SUCCESS)
return -1;
}