From c0dc4dcad95f8d8e95986c61514544b52387408a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 23 Jan 2014 15:10:09 +0000 Subject: dbx_mmap to verify password before checking file git-svn-id: http://svn.miranda-ng.org/main/trunk@7835 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/database.cpp | 4 ++++ src/modules/database/dbintf.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index 21a958ecd4..2e2adf9b50 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -32,6 +32,8 @@ TCHAR g_profileDir[MAX_PATH], g_profileName[MAX_PATH], g_shortProfileName[MAX_PA TCHAR* g_defaultProfile; void EnsureCheckerLoaded(bool); +void LoadDatabaseServices(); + bool fileExist(TCHAR* fname) { if (*fname == 0) @@ -437,6 +439,8 @@ int LoadDatabaseModule(void) _tchdir(szProfile); szProfile[0] = 0; + LoadDatabaseServices(); + // find out which profile to load if (!getProfile(szProfile, SIZEOF(szProfile))) return 1; diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp index 58b86606b6..14e02c7430 100644 --- a/src/modules/database/dbintf.cpp +++ b/src/modules/database/dbintf.cpp @@ -145,8 +145,6 @@ static INT_PTR srvDestroyInstance(WPARAM wParam,LPARAM lParam) int LoadDbintfModule() { - CreateServiceFunction(MS_DB_SETSAFETYMODE, srvSetSafetyMode); - CreateServiceFunction(MS_DB_CONTACT_GETCOUNT, srvGetContactCount); CreateServiceFunction(MS_DB_CONTACT_DELETE, srvDeleteContact); CreateServiceFunction(MS_DB_CONTACT_ADD, srvAddContact); @@ -166,3 +164,8 @@ int LoadDbintfModule() CreateServiceFunction(MS_DB_DESTROY_INSTANCE, srvDestroyInstance); return 0; } + +void LoadDatabaseServices() +{ + CreateServiceFunction(MS_DB_SETSAFETYMODE, srvSetSafetyMode); +} -- cgit v1.2.3