summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbintf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp16
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;