Don't enforce features with soft dependencies before all plugins are loaded
authorMartin Willi <martin@revosec.ch>
Fri, 14 Oct 2011 08:01:11 +0000 (10:01 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 14 Oct 2011 08:05:49 +0000 (10:05 +0200)
src/libstrongswan/plugins/plugin_loader.c

index 006a1b7..a8f7a64 100644 (file)
@@ -503,14 +503,14 @@ METHOD(plugin_loader_t, load_plugins, bool,
                {
                        /* try load new features until we don't get new ones */
                }
-               while (load_features(this, FALSE, FALSE))
-               {
-                       /* second round, ignoring soft dependencies */
-               }
        }
        enumerator->destroy(enumerator);
        if (!critical_failed)
        {
+               while (load_features(this, FALSE, FALSE))
+               {
+                       /* enforce loading features, ignoring soft dependencies */
+               }
                /* report missing dependencies */
                load_features(this, FALSE, TRUE);
                /* unload plugins that we were not able to load any features for */