]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Easier to understand test for soft dependencies in dependencies_satisfied.
authorTobias Brunner <tobias@strongswan.org>
Thu, 22 Sep 2011 15:59:17 +0000 (17:59 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 14 Oct 2011 08:05:46 +0000 (10:05 +0200)
src/libstrongswan/plugins/plugin_loader.c

index ecd1d718f10e9f5dc6a670e5197105954bd557a6..462ba7047a8e222902bf4f36ef42795b30620cb4 100644 (file)
@@ -231,7 +231,6 @@ static bool feature_loaded(private_plugin_loader_t *this, plugin_entry_t *entry,
 /**
  * Check if dependencies are satisfied
  */
-
 static bool dependencies_satisfied(private_plugin_loader_t *this, char *name,
                                bool soft, bool report, plugin_feature_t *features, int count)
 {
@@ -266,7 +265,7 @@ static bool dependencies_satisfied(private_plugin_loader_t *this, char *name,
                }
                entries->destroy(entries);
 
-               if (!found && !(features[i].kind == FEATURE_SDEPEND && !soft))
+               if (!found && (features[i].kind != FEATURE_SDEPEND || soft))
                {
                        if (report)
                        {