summaryrefslogtreecommitdiff
path: root/src/modules/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-30 07:16:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-30 07:16:51 +0000
commit8db272850a6e89689424eb3058e833511ee64232 (patch)
tree4c094008f8f1ac93e07cf10fb6747e78dce89ff7 /src/modules/plugins
parent8df61eefd63a9816aa25e3b567a82e74f5acc3d0 (diff)
service plugin's launcher in Profile Manager always launches DbChecker
git-svn-id: http://svn.miranda-ng.org/main/trunk@1270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins')
-rw-r--r--src/modules/plugins/newplugins.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index f583b2aa09..359b2705e3 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -632,18 +632,26 @@ int LoadServiceModePlugin()
return (serviceModePlugin == NULL) ? SERVICE_CONTINUE : LaunchServicePlugin(serviceModePlugin);
}
-void EnsureCheckerLoaded(void)
+void EnsureCheckerLoaded(bool bEnable)
{
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;
+ if (bEnable) {
+ if ( !(p->pclass & PCLASS_LOADED)) {
+ if (p->bpi.Load() != ERROR_SUCCESS)
+ Plugin_Uninit(p);
+ else
+ p->pclass |= PCLASS_LOADED;
+ }
+ }
+ else {
+ if (p->pclass & PCLASS_LOADED) {
+ p->bpi.Unload();
+ p->pclass &= ~PCLASS_LOADED;
+ }
}
break;
}