]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
conftest: Don't load plugins incrementally
authorTobias Brunner <tobias@strongswan.org>
Tue, 3 Sep 2013 17:02:40 +0000 (19:02 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 09:44:04 +0000 (11:44 +0200)
This is not supported by the plugin loader, so we simply combine the
plugin lists and load them all at once.

src/conftest/conftest.c

index 8d2060c66358c5bc5b7484d7068599d6316a02fb..faf9df91fdeee1245ae3954a8cec0f9b10144757 100644 (file)
@@ -432,7 +432,7 @@ int main(int argc, char *argv[])
        int status = 0;
        sigset_t set;
        int sig;
-       char *suite_file = "suite.conf", *test_file = NULL;
+       char *suite_file = "suite.conf", *test_file = NULL, *preload, *plugins;
        file_logger_t *logger;
 
        if (!library_init(NULL))
@@ -509,16 +509,18 @@ int main(int argc, char *argv[])
        }
        load_loggers(logger);
 
-       if (!lib->plugins->load(lib->plugins,
-                       conftest->test->get_str(conftest->test, "preload", "")))
+       preload = conftest->test->get_str(conftest->test, "preload", "");
+       if (asprintf(&plugins, "%s %s", preload, PLUGINS) < 0)
        {
                return 1;
        }
-       if (!charon->initialize(charon, PLUGINS))
+       if (!charon->initialize(charon, plugins))
        {
+               free(plugins);
                return 1;
        }
        lib->plugins->status(lib->plugins, LEVEL_CTRL);
+       free(plugins);
 
        if (!load_certs(conftest->test, conftest->suite_dir))
        {