From be3185a374d39a8ee0f12a4e985ecca279633fff Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 Jul 2012 18:29:52 +0000 Subject: - MS_DB_CHECKPROFILE - service for checking databases - added menu item "Check" to a context menu in profile manager git-svn-id: http://svn.miranda-ng.org/main/trunk@1228 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/modules/plugins/newplugins.cpp') diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index b52e917dd0..7bdd1d87b1 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -421,7 +421,6 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) return p; } - void SetPluginOnWhiteList(const TCHAR* pluginname, int allow) { char plugName[MAX_PATH]; @@ -589,7 +588,6 @@ static int LaunchServicePlugin(pluginEntry* p) // plugin load failed - terminating Miranda if ( !( p->pclass & PCLASS_LOADED)) { if (p->bpi.Load() != ERROR_SUCCESS) { - p->pclass |= PCLASS_FAILED; Plugin_Uninit(p); return SERVICE_FAILED; } @@ -630,6 +628,23 @@ int LoadServiceModePlugin() return (serviceModePlugin == NULL) ? SERVICE_CONTINUE : LaunchServicePlugin(serviceModePlugin); } +void EnsureCheckerLoaded(void) +{ + for (int i=0; i < servicePlugins.getCount(); i++) { + pluginEntry* p = servicePlugins[i]; + if ( _tcsicmp(p->pluginname, _T("dbchecker.dll"))) + continue; + + if ( !(p->pclass & PCLASS_LOADED)) { + if (p->bpi.Load() != ERROR_SUCCESS) + Plugin_Uninit(p); + else + p->pclass |= PCLASS_LOADED; + } + break; + } +} + ///////////////////////////////////////////////////////////////////////////////////////// // Event hook to unload all non-core plugins // hooked very late, after all the internal plugins, blah -- cgit v1.2.3