aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/daemon.c')
-rw-r--r--src/libcharon/daemon.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c
index 343063be5..575627206 100644
--- a/src/libcharon/daemon.c
+++ b/src/libcharon/daemon.c
@@ -111,6 +111,12 @@ static void destroy(private_daemon_t *this)
}
DESTROY_IF(this->public.receiver);
DESTROY_IF(this->public.sender);
+#ifdef ME
+ DESTROY_IF(this->public.connect_manager);
+ DESTROY_IF(this->public.mediation_manager);
+#endif /* ME */
+ /* make sure the cache is clear before unloading plugins */
+ lib->credmgr->flush_cache(lib->credmgr, CERT_ANY);
/* unload plugins to release threads */
lib->plugins->unload(lib->plugins);
#ifdef CAPABILITIES_LIBCAP
@@ -123,10 +129,6 @@ static void destroy(private_daemon_t *this)
DESTROY_IF(this->public.controller);
DESTROY_IF(this->public.eap);
DESTROY_IF(this->public.xauth);
-#ifdef ME
- DESTROY_IF(this->public.connect_manager);
- DESTROY_IF(this->public.mediation_manager);
-#endif /* ME */
DESTROY_IF(this->public.backends);
DESTROY_IF(this->public.socket);
@@ -200,27 +202,6 @@ METHOD(daemon_t, start, void,
DEFAULT_THREADS));
}
-/**
- * Log loaded plugins
- */
-static void print_plugins()
-{
- char buf[512];
- int len = 0;
- enumerator_t *enumerator;
- plugin_t *plugin;
-
- buf[0] = '\0';
- enumerator = lib->plugins->create_plugin_enumerator(lib->plugins);
- while (len < sizeof(buf) && enumerator->enumerate(enumerator, &plugin, NULL))
- {
- len += snprintf(&buf[len], sizeof(buf)-len, "%s ",
- plugin->get_name(plugin));
- }
- enumerator->destroy(enumerator);
- DBG1(DBG_DMN, "loaded plugins: %s", buf);
-}
-
METHOD(daemon_t, initialize, bool,
private_daemon_t *this)
{
@@ -241,8 +222,8 @@ METHOD(daemon_t, initialize, bool,
{
return FALSE;
}
-
- print_plugins();
+ DBG1(DBG_DMN, "loaded plugins: %s",
+ lib->plugins->loaded_plugins(lib->plugins));
this->public.ike_sa_manager = ike_sa_manager_create();
if (this->public.ike_sa_manager == NULL)