diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-13 21:33:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-13 21:33:15 +0000 |
commit | c842fa175cdda0331567ea6f06e7084ceb51d260 (patch) | |
tree | 81457f2b09a80659cbd907e7ee74995a8bd0df85 /plugins/Dbx_mdb/src/dbmodulechain.cpp | |
parent | 5952466c42cf02a659f5b110c77eca76a5476391 (diff) |
well, everything works but events
git-svn-id: http://svn.miranda-ng.org/main/trunk@11850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbmodulechain.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbmodulechain.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp index 4643a2d295..a54d7ab2f9 100644 --- a/plugins/Dbx_mdb/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp @@ -103,10 +103,13 @@ DWORD CDbxMdb::GetModuleNameOfs(const char *szName) MDB_val key = { sizeof(int), &newIdx }, data = { sizeof(DBModuleName) + nameLen, pmod }; - txn_lock trnlck(m_pMdbEnv); - mdb_open(trnlck, "modules", MDB_INTEGERKEY, &m_dbModules); - mdb_put(trnlck, m_dbModules, &key, &data, 0);
- trnlck.commit();
+ for (;; Remap()) {
+ txn_lock trnlck(m_pMdbEnv); + mdb_open(trnlck, "modules", MDB_INTEGERKEY, &m_dbModules); + mdb_put(trnlck, m_dbModules, &key, &data, 0);
+ if (trnlck.commit())
+ break;
+ }
// add to cache
char *mod = (char*)HeapAlloc(m_hModHeap, 0, nameLen + 1);
|