summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/storage_lmdb.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 5fb1d0f..68157c9 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -44,12 +44,14 @@ namespace Storage {
44 44
45extern QReadWriteLock sDbisLock; 45extern QReadWriteLock sDbisLock;
46extern QReadWriteLock sEnvironmentsLock; 46extern QReadWriteLock sEnvironmentsLock;
47extern QMutex sCreateDbiLock;
47extern QHash<QString, MDB_env *> sEnvironments; 48extern QHash<QString, MDB_env *> sEnvironments;
48extern QHash<QString, MDB_dbi> sDbis; 49extern QHash<QString, MDB_dbi> sDbis;
49 50
50 51
51QReadWriteLock sDbisLock; 52QReadWriteLock sDbisLock;
52QReadWriteLock sEnvironmentsLock; 53QReadWriteLock sEnvironmentsLock;
54QMutex sCreateDbiLock;
53QHash<QString, MDB_env *> sEnvironments; 55QHash<QString, MDB_env *> sEnvironments;
54QHash<QString, MDB_dbi> sDbis; 56QHash<QString, MDB_dbi> sDbis;
55 57
@@ -106,9 +108,6 @@ static QList<QByteArray> getDatabaseNames(MDB_txn *transaction)
106 * and we always need to commit the transaction ASAP 108 * and we always need to commit the transaction ASAP
107 * We can only ever enter from one point per process. 109 * We can only ever enter from one point per process.
108 */ 110 */
109
110QMutex sCreateDbiLock;
111
112static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi) 111static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi)
113{ 112{
114 113