aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-21 14:46:17 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-21 15:22:46 +0200
commit0d25c4ef8794b1488e8a4755449a08a239eb600e (patch)
treeceeb00a26a82c88051228e609ef78305f27481d8 /src
parent607f8e99068dd8a1afebf9035ded1ae56424a2ec (diff)
downloadstrongswan-0d25c4ef8794b1488e8a4755449a08a239eb600e.tar.bz2
strongswan-0d25c4ef8794b1488e8a4755449a08a239eb600e.tar.xz
plugin-loader: Move logging of failed features to status()
Still log an error message if critical features fail, as loaded plugins/features are not logged in that case. This way loaded plugins are printed before failed features and the relation is easier to make for users. It also allows programs to log this message on a different level.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/plugin_loader.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c
index 26310645b..e08b12306 100644
--- a/src/libstrongswan/plugins/plugin_loader.c
+++ b/src/libstrongswan/plugins/plugin_loader.c
@@ -968,14 +968,11 @@ METHOD(plugin_loader_t, load_plugins, bool,
if (!critical_failed)
{
load_features(this);
- /* evaluate stats collected while loading the features */
- critical_failed = this->stats.critical > 0;
- if (this->stats.failed)
+ if (this->stats.critical > 0)
{
- DBG1(DBG_LIB, "failed to load %d plugin feature%s (%d due to unmet "
- "dependencies, %d critical)", this->stats.failed,
- this->stats.failed == 1 ? "" : "s", this->stats.depends,
- this->stats.critical);
+ critical_failed = TRUE;
+ DBG1(DBG_LIB, "failed to load %d critical plugin feature%s",
+ this->stats.critical, this->stats.critical == 1 ? "" : "s");
}
/* unload plugins that we were not able to load any features for */
purge_plugins(this);
@@ -1088,6 +1085,13 @@ METHOD(plugin_loader_t, status, void,
if (this->loaded_plugins)
{
dbg(DBG_LIB, level, "loaded plugins: %s", this->loaded_plugins);
+
+ if (this->stats.failed)
+ {
+ dbg(DBG_LIB, level, "unable to load %d plugin feature%s (%d due to "
+ "unmet dependencies)", this->stats.failed,
+ this->stats.failed == 1 ? "" : "s", this->stats.depends);
+ }
}
}