summaryrefslogtreecommitdiff
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-07-11 07:23:31 +0200
committerYves-Alexis Perez <corsac@debian.org>2014-07-11 07:23:31 +0200
commit81c63b0eed39432878f78727f60a1e7499645199 (patch)
tree82387d8fecd1c20788fd8bd784a9b0bde091fb6b /src/libstrongswan/library.c
parentc5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (diff)
downloadvyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.tar.gz
vyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.zip
Imported Upstream version 5.2.0
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index c5bb4cd93..e3ad16411 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -141,11 +141,13 @@ void library_deinit()
{
lib->leak_detective->report(lib->leak_detective, detailed);
lib->leak_detective->destroy(lib->leak_detective);
+ lib->leak_detective = NULL;
}
+ backtrace_deinit();
arrays_deinit();
+ utils_deinit();
threads_deinit();
- backtrace_deinit();
free((void*)this->public.ns);
free(this);
@@ -249,6 +251,8 @@ bool library_init(char *settings, const char *namespace)
return !this->integrity_failed;
}
+ chunk_hash_seed();
+
INIT(this,
.public = {
.get = _get,
@@ -259,9 +263,10 @@ bool library_init(char *settings, const char *namespace)
);
lib = &this->public;
- backtrace_init();
threads_init();
+ utils_init();
arrays_init();
+ backtrace_init();
#ifdef LEAK_DETECTIVE
lib->leak_detective = leak_detective_create();
@@ -298,6 +303,13 @@ bool library_init(char *settings, const char *namespace)
this->objects = hashtable_create((hashtable_hash_t)hash,
(hashtable_equals_t)equals, 4);
+
+#ifdef STRONGSWAN_CONF
+ if (!settings)
+ {
+ settings = STRONGSWAN_CONF;
+ }
+#endif
this->public.settings = settings_create(settings);
/* all namespace settings may fall back to libstrongswan */
lib->settings->add_fallback(lib->settings, lib->ns, "libstrongswan");