diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-14 14:29:52 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-14 14:29:52 +0000 |
commit | e37f12dec252a78cdf94d31ccc87ce37c1436a1f (patch) | |
tree | 09d50f93a1f260e054908c775264819e82a0db48 /plugins/Dbx_mdb/src/dbintf.cpp | |
parent | 5f4a6f00c20468e6adc3a7bf691eccef55d2324c (diff) |
txn_ptr & cursor_ptr classes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11853 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbintf.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index b889ea8f5b..48f7deb1db 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -52,7 +52,7 @@ CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) : mdb_env_create(&m_pMdbEnv);
mdb_env_set_maxdbs(m_pMdbEnv, 10);
- +
m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
m_hModHeap = HeapCreate(0, 0, 0);
}
@@ -62,7 +62,7 @@ CDbxMdb::~CDbxMdb() // destroy modules
HeapDestroy(m_hModHeap);
- mdb_env_close(m_pMdbEnv); + mdb_env_close(m_pMdbEnv);
DestroyServiceFunction(hService);
UnhookEvent(hHook);
@@ -89,12 +89,12 @@ int CDbxMdb::Load(bool bSkipInit) return EGROKPRF_CANTREAD;
if (!bSkipInit) {
- txn_lock trnlck(m_pMdbEnv); - mdb_open(trnlck, "contacts", MDB_CREATE | MDB_INTEGERKEY, &m_dbContacts); - mdb_open(trnlck, "modules", MDB_CREATE | MDB_INTEGERKEY, &m_dbModules); - mdb_open(trnlck, "events", MDB_CREATE | MDB_INTEGERKEY, &m_dbEvents); - mdb_open(trnlck, "settings", MDB_CREATE, &m_dbSettings); - trnlck.commit(); + txn_ptr trnlck(m_pMdbEnv);
+ mdb_open(trnlck, "contacts", MDB_CREATE | MDB_INTEGERKEY, &m_dbContacts);
+ mdb_open(trnlck, "modules", MDB_CREATE | MDB_INTEGERKEY, &m_dbModules);
+ mdb_open(trnlck, "events", MDB_CREATE | MDB_INTEGERKEY, &m_dbEvents);
+ mdb_open(trnlck, "settings", MDB_CREATE, &m_dbSettings);
+ trnlck.commit();
if (InitModuleNames()) return EGROKPRF_CANTREAD;
if (InitCrypt()) return EGROKPRF_CANTREAD;
|