aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-11-23 10:50:36 +0100
committerMartin Willi <martin@revosec.ch>2011-01-05 16:45:49 +0100
commit401818651e76404eb57d825681e821f84f8faeda (patch)
tree8d665a7bd5a254478a64d876839427b7e1fe5555
parent74a5dfe537d871eda90b88c5a9e3e59a20492617 (diff)
downloadstrongswan-401818651e76404eb57d825681e821f84f8faeda.tar.bz2
strongswan-401818651e76404eb57d825681e821f84f8faeda.tar.xz
Moved generic infrastructure initialization to libcharon_init(), allows us to preload plugins
-rw-r--r--src/libcharon/daemon.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c
index b8b7d8890..2e708745c 100644
--- a/src/libcharon/daemon.c
+++ b/src/libcharon/daemon.c
@@ -210,16 +210,6 @@ METHOD(daemon_t, initialize, bool,
DBG1(DBG_DMN, "daemon 'charon': passed file integrity test");
}
- /* load secrets, ca certificates and crls */
- this->public.controller = controller_create();
- this->public.eap = eap_manager_create();
- this->public.sim = sim_manager_create();
- this->public.tnccs = tnccs_manager_create();
- this->public.backends = backend_manager_create();
- this->public.socket = socket_manager_create();
- this->public.traps = trap_manager_create();
- this->kernel_handler = kernel_handler_create();
-
/* load plugins, further infrastructure may need it */
if (!lib->plugins->load(lib->plugins, NULL,
lib->settings->get_str(lib->settings, "charon.load", PLUGINS)))
@@ -271,6 +261,15 @@ private_daemon_t *daemon_create()
.sys_loggers = linked_list_create(),
},
);
+ charon = &this->public;
+ this->public.controller = controller_create();
+ this->public.eap = eap_manager_create();
+ this->public.sim = sim_manager_create();
+ this->public.tnccs = tnccs_manager_create();
+ this->public.backends = backend_manager_create();
+ this->public.socket = socket_manager_create();
+ this->public.traps = trap_manager_create();
+ this->kernel_handler = kernel_handler_create();
#ifdef CAPABILITIES
#ifdef CAPABILITIES_LIBCAP
@@ -303,7 +302,6 @@ bool libcharon_init()
private_daemon_t *this;
this = daemon_create();
- charon = &this->public;
/* for uncritical pseudo random numbers */
srandom(time(NULL) + getpid());