From 3583f79d974d805aa67ba8b1feb49a4974c2e4cd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 25 Mar 2018 21:10:33 +0300 Subject: dbchecker moved to deprecated --- plugins/Db3x_mmap/src/dbheaders.cpp | 2 +- plugins/Db3x_mmap/src/dbintf.cpp | 21 --------------------- plugins/Db3x_mmap/src/dbintf.h | 2 -- plugins/Db3x_mmap/src/init.cpp | 17 +---------------- 4 files changed, 2 insertions(+), 40 deletions(-) (limited to 'plugins/Db3x_mmap/src') diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index f281d971a9..7fd730e156 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -//the cache has not been loaded when these functions are used +// the cache is not loaded when these functions are used int CDb3Mmap::CreateDbHeaders(const DBSignature& _sign) { diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index be36e4bdd7..faf15ebd62 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -157,27 +157,6 @@ int CDb3Mmap::Create() return (m_hDbFile == INVALID_HANDLE_VALUE); } -int CDb3Mmap::PrepareCheck(int *error) -{ - int ret = CheckDbHeaders(true); - switch (ret) { - case ERROR_SUCCESS: - case EGROKPRF_OBSOLETE: - *error = ret; - break; - - default: - return ret; - } - - InitMap(); - InitModuleNames(); - if ((ret = InitCrypt()) != ERROR_SUCCESS) - return ret; - - return ERROR_SUCCESS; -} - STDMETHODIMP_(void) CDb3Mmap::SetCacheSafetyMode(BOOL bIsSet) { { mir_cslock lck(m_csDbAccess); diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 5ad1b21c53..d17c7b2fb0 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -198,8 +198,6 @@ struct CDb3Mmap : public MDatabaseCommon, public MIDatabaseChecker, public MZero void SetPassword(const wchar_t *ptszPassword); void UpdateMenuItem(void); - int PrepareCheck(int*); - __forceinline LPTSTR GetMenuTitle() const { return m_bUsesPassword ? LPGENW("Change/remove password") : LPGENW("Set password"); } void DatabaseCorruption(wchar_t *text); diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index 65a50988c5..1cca7c767d 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -119,20 +119,6 @@ LBL_Error: return db.release(); } -MIDatabaseChecker* CheckDb(const wchar_t *profile, int *error) -{ - std::auto_ptr db(new CDb3Mmap(profile, DBMODE_READONLY)); - if (db->Load(true) != ERROR_SUCCESS) { - *error = ERROR_ACCESS_DENIED; - return nullptr; - } - - if (db->PrepareCheck(error)) - return nullptr; - - return db.release(); -} - static DATABASELINK dblink = { sizeof(DATABASELINK), @@ -140,8 +126,7 @@ static DATABASELINK dblink = L"dbx mmap driver", makeDatabase, grokHeader, - LoadDatabase, - CheckDb + LoadDatabase }; ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3