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/commonheaders.h | |
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/commonheaders.h')
-rw-r--r-- | plugins/Dbx_mdb/src/commonheaders.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/Dbx_mdb/src/commonheaders.h b/plugins/Dbx_mdb/src/commonheaders.h index ecc4347629..7b0c0bc0ad 100644 --- a/plugins/Dbx_mdb/src/commonheaders.h +++ b/plugins/Dbx_mdb/src/commonheaders.h @@ -59,10 +59,13 @@ extern LIST<CDbxMdb> g_Dbs; class txn_lock
{
MDB_txn *txn;
+ MDB_env *env;
public:
- __forceinline txn_lock(MDB_env *pEnv)
- { mdb_txn_begin(pEnv, NULL, 0, &txn); + __forceinline txn_lock(MDB_env *pEnv) :
+ env(pEnv)
+ { + mdb_txn_begin(pEnv, NULL, 0, &txn); }
__forceinline ~txn_lock()
@@ -73,10 +76,11 @@ public: __forceinline operator MDB_txn*() const { return txn; }
- __forceinline void commit()
+ __forceinline bool commit()
{
- mdb_txn_commit(txn);
+ bool bRes = (mdb_txn_commit(txn) != MDB_MAP_FULL);
txn = NULL;
+ return bRes;
}
__forceinline void abort()
|