diff options
author | Martin Willi <martin@revosec.ch> | 2011-10-10 14:14:52 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-10-14 10:05:47 +0200 |
commit | 2feed2f3feb6c03be9a915e79887089189641caa (patch) | |
tree | 76ac6b2bc3cd96fc0992e121e948ad25cb79b645 | |
parent | 927bc3b5b8091b805c816366a727ec91cd8314b5 (diff) | |
download | strongswan-2feed2f3feb6c03be9a915e79887089189641caa.tar.bz2 strongswan-2feed2f3feb6c03be9a915e79887089189641caa.tar.xz |
Load features after each plugin loaded until all plugins have feature support
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index 39bea23e6..bf57dc12c 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -471,10 +471,9 @@ METHOD(plugin_loader_t, load_plugins, bool, DBG1(DBG_LIB, "loading critical plugin '%s' failed", token); } free(token); - } - enumerator->destroy(enumerator); - if (!critical_failed) - { + /* TODO: we currently load features after each plugin is loaded. This + * will not be necessary once we have features support in all plugins. + */ while (load_features(this, TRUE, FALSE)) { /* try load new features until we don't get new ones */ @@ -483,6 +482,10 @@ METHOD(plugin_loader_t, load_plugins, bool, { /* second round, ignoring soft dependencies */ } + } + enumerator->destroy(enumerator); + if (!critical_failed) + { /* report missing dependencies */ load_features(this, FALSE, TRUE); /* unload plugins that we were not able to load any features for */ |