summaryrefslogtreecommitdiff
path: root/src/modules/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-28 18:29:52 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-28 18:29:52 +0000
commitbe3185a374d39a8ee0f12a4e985ecca279633fff (patch)
tree14ba64a79d7dd62d95797db402950702a24667fe /src/modules/plugins
parent61be34f18c2d61c075a7e268aa9aab89b78ec17a (diff)
- 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
Diffstat (limited to 'src/modules/plugins')
-rw-r--r--src/modules/plugins/newplugins.cpp19
1 files changed, 17 insertions, 2 deletions
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