diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-08 14:44:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-08 14:44:50 +0000 |
commit | 2528f3b4fa08ddce81d27f591dfb6c1dbc214a71 (patch) | |
tree | c2a62f888b15ae55f0e4a5da28a775d3be4c5dcb /plugins/Dbx_mdb/src/dbintf.cpp | |
parent | 166213fbc42066680b8423a735d36eb260a30c75 (diff) |
next compilable variant
git-svn-id: http://svn.miranda-ng.org/main/trunk@11797 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbintf.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index 9562f58de8..880c0c80fd 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -51,8 +51,8 @@ CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) : InitDbInstance(this);
mdb_env_create(&m_pMdbEnv);
- mdb_env_set_maxdbs(m_pMdbEnv, 4);
-
+ mdb_env_set_maxdbs(m_pMdbEnv, 10);
+ m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
m_hModHeap = HeapCreate(0, 0, 0);
}
@@ -95,8 +95,14 @@ int CDbxMdb::Load(bool bSkipInit) return EGROKPRF_CANTREAD;
if (!bSkipInit) {
- if (InitModuleNames()) return 1;
- if (InitCrypt()) return EGROKPRF_CANTREAD;
+ mdb_txn_begin(m_pMdbEnv, NULL, 0, &m_txn); +
+ mdb_open(m_txn, "modules", MDB_CREATE | MDB_INTEGERKEY, &m_dbModules); + mdb_open(m_txn, "contacts", MDB_CREATE | MDB_INTEGERKEY, &m_dbContacts); + mdb_open(m_txn, "events", MDB_CREATE | MDB_INTEGERKEY, &m_dbEvents); +
+ if (InitModuleNames()) return EGROKPRF_CANTREAD;
+ if (InitCrypt()) return EGROKPRF_CANTREAD;
// everything is ok, go on
if (!m_bReadOnly) {
|