diff options
| author | George Hazan <ghazan@miranda.im> | 2018-03-23 16:58:35 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2018-03-23 16:58:35 +0300 |
| commit | 6a6b08bfbdc3d77874b72ccb4b99cc50c6b8397b (patch) | |
| tree | 5c0db265d88d596bb0644370f49c84135f0143b4 /plugins/Dbx_mdbx/src/dbmodulechain.cpp | |
| parent | 57b7c931f578057739f014734257ed8e6b21713f (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.cpp | 6 |
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;
}
|
