Cache list of plugin names to further simplify its usage.

Also helpful for ipsec statusall to avoid having to enumerate plugins.
This commit is contained in:
Tobias Brunner
2012-01-19 12:37:42 +01:00
parent fdf1f239ef
commit f1ba06c1c6
8 changed files with 62 additions and 73 deletions
+3 -5
View File
@@ -414,8 +414,7 @@ METHOD(stroke_list_t, status, void,
if (all)
{
peer_cfg_t *peer_cfg;
plugin_t *plugin;
char *pool, *plugins;
char *pool;
host_t *host;
u_int32_t dpd;
time_t since, now;
@@ -449,9 +448,8 @@ METHOD(stroke_list_t, status, void,
}
fprintf(out, ", scheduled: %d\n",
lib->scheduler->get_job_load(lib->scheduler));
plugins = lib->plugins->loaded_plugins(lib->plugins);
fprintf(out, " loaded plugins: %s\n", plugins);
free(plugins);
fprintf(out, " loaded plugins: %s\n",
lib->plugins->loaded_plugins(lib->plugins));
first = TRUE;
enumerator = this->attribute->create_pool_enumerator(this->attribute);