Simplified logging of list of loaded plugins.
This commit is contained in:
@@ -280,18 +280,11 @@ usage(const char *message)
|
||||
*/
|
||||
static void print_plugins()
|
||||
{
|
||||
char buf[BUF_LEN];
|
||||
plugin_t *plugin;
|
||||
int len = 0;
|
||||
enumerator_t *enumerator;
|
||||
char *plugins;
|
||||
|
||||
enumerator = lib->plugins->create_plugin_enumerator(lib->plugins);
|
||||
while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin, NULL))
|
||||
{
|
||||
len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin->get_name(plugin));
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
DBG1(DBG_LIB, " loaded plugins: %s", buf);
|
||||
plugins = lib->plugins->loaded_plugins(lib->plugins);
|
||||
DBG1(DBG_LIB, " loaded plugins: %s", plugins);
|
||||
free(plugins);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user