diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/daemon.c | 2 | ||||
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_list.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.c | 7 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.h | 6 | ||||
-rw-r--r-- | src/pluto/log.c | 2 | ||||
-rw-r--r-- | src/pluto/plutomain.c | 2 | ||||
-rw-r--r-- | src/scepclient/scepclient.c | 2 |
7 files changed, 16 insertions, 7 deletions
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c index a108cd4ef..9412fee7c 100644 --- a/src/libcharon/daemon.c +++ b/src/libcharon/daemon.c @@ -214,7 +214,7 @@ static void print_plugins() buf[0] = '\0'; enumerator = lib->plugins->create_plugin_enumerator(lib->plugins); - while (len < sizeof(buf) && enumerator->enumerate(enumerator, &plugin)) + while (len < sizeof(buf) && enumerator->enumerate(enumerator, &plugin, NULL)) { len += snprintf(&buf[len], sizeof(buf)-len, "%s ", plugin->get_name(plugin)); diff --git a/src/libcharon/plugins/stroke/stroke_list.c b/src/libcharon/plugins/stroke/stroke_list.c index 485c7b313..8ceb8b4ca 100644 --- a/src/libcharon/plugins/stroke/stroke_list.c +++ b/src/libcharon/plugins/stroke/stroke_list.c @@ -451,7 +451,7 @@ METHOD(stroke_list_t, status, void, lib->scheduler->get_job_load(lib->scheduler)); fprintf(out, " loaded plugins: "); enumerator = lib->plugins->create_plugin_enumerator(lib->plugins); - while (enumerator->enumerate(enumerator, &plugin)) + while (enumerator->enumerate(enumerator, &plugin, NULL)) { fprintf(out, "%s ", plugin->get_name(plugin)); } diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index 26af529d4..cd942a7e0 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -177,9 +177,14 @@ static bool load_plugin(private_plugin_loader_t *this, char *name, char *file) /** * Convert enumerated entries to plugin_t */ -static bool plugin_filter(void *null, plugin_entry_t **entry, plugin_t **plugin) +static bool plugin_filter(void *null, plugin_entry_t **entry, plugin_t **plugin, + void *in, linked_list_t **list) { *plugin = (*entry)->plugin; + if (list) + { + *list = (*entry)->loaded; + } return TRUE; } diff --git a/src/libstrongswan/plugins/plugin_loader.h b/src/libstrongswan/plugins/plugin_loader.h index e03da4543..ea36bb147 100644 --- a/src/libstrongswan/plugins/plugin_loader.h +++ b/src/libstrongswan/plugins/plugin_loader.h @@ -59,7 +59,11 @@ struct plugin_loader_t { /** * Create an enumerator over all loaded plugins. * - * @return enumerator over plugin_t* + * In addition to the plugin, a to read-only list is enumerated (if it is + * not NULL). This list contains pointer to plugin features currently + * loaded. + * + * @return enumerator over plugin_t*, linked_list_t* */ enumerator_t* (*create_plugin_enumerator)(plugin_loader_t *this); diff --git a/src/pluto/log.c b/src/pluto/log.c index c5f1776ec..1f5eafd9a 100644 --- a/src/pluto/log.c +++ b/src/pluto/log.c @@ -841,7 +841,7 @@ static void show_loaded_plugins() buf[0] = '\0'; enumerator = lib->plugins->create_plugin_enumerator(lib->plugins); - while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin)) + while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin, NULL)) { len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin->get_name(plugin)); } diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c index b1ec7cb56..8aead3e3c 100644 --- a/src/pluto/plutomain.c +++ b/src/pluto/plutomain.c @@ -271,7 +271,7 @@ static void print_plugins() buf[0] = '\0'; enumerator = lib->plugins->create_plugin_enumerator(lib->plugins); - while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin)) + while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin, NULL)) { len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin->get_name(plugin)); } diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c index 6e7125b74..6d5bf38ae 100644 --- a/src/scepclient/scepclient.c +++ b/src/scepclient/scepclient.c @@ -286,7 +286,7 @@ static void print_plugins() enumerator_t *enumerator; enumerator = lib->plugins->create_plugin_enumerator(lib->plugins); - while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin)) + while (len < BUF_LEN && enumerator->enumerate(enumerator, &plugin, NULL)) { len += snprintf(&buf[len], BUF_LEN-len, "%s ", plugin->get_name(plugin)); } |