From 13097624def03763998de3d5dd2f8b9477d4e51d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 30 Jul 2012 14:23:21 +0000 Subject: fix to avoid the DbChecker's call after database opening git-svn-id: http://svn.miranda-ng.org/main/trunk@1275 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbintf.cpp | 4 ++-- src/modules/plugins/newplugins.cpp | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index 3decb9bc4b..34a34ab6ab 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -118,11 +118,11 @@ int CDb3Base::Load(bool bSkipInit) DWORD dummy = 0; m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, NULL); if ( m_hDbFile == INVALID_HANDLE_VALUE ) - return 1; + return EGROKPRF_CANTREAD; if ( !ReadFile(m_hDbFile,&m_dbHeader,sizeof(m_dbHeader),&dummy,NULL)) { CloseHandle(m_hDbFile); - return 1; + return EGROKPRF_CANTREAD; } if ( !bSkipInit) { diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 359b2705e3..93a7673895 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -643,16 +643,13 @@ void EnsureCheckerLoaded(bool bEnable) if ( !(p->pclass & PCLASS_LOADED)) { if (p->bpi.Load() != ERROR_SUCCESS) Plugin_Uninit(p); - else + else { p->pclass |= PCLASS_LOADED; + servicePlugins.remove(i); + } } } - else { - if (p->pclass & PCLASS_LOADED) { - p->bpi.Unload(); - p->pclass &= ~PCLASS_LOADED; - } - } + else Plugin_Uninit(p); break; } } -- cgit v1.2.3