diff options
Diffstat (limited to 'plugins/Dbx_mdb/src/dbmodulechain.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbmodulechain.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp index cc988e3f66..77ad7c8481 100644 --- a/plugins/Dbx_mdb/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp @@ -42,15 +42,13 @@ int CDbxMdb::InitModuleNames(void) {
m_maxModuleID = 0;
+ mir_cslock lck(m_csDbAccess);
txn_ptr_ro trnlck(m_txn);
- //mdb_open(trnlck, "modules", MDB_INTEGERKEY, &m_dbModules);
-
- cursor_ptr cursor(trnlck, m_dbModules);
- if (!cursor)
- return 1;
+ cursor_ptr_ro cursor(m_curModules);
MDB_val key, data;
- while (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) == 0) {
+ while (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) == 0)
+ {
DBModuleName *pmod = (DBModuleName*)data.mv_data;
if (pmod->dwSignature != DBMODULENAME_SIGNATURE)
DatabaseCorruption(NULL);
|