aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-01-22 11:50:39 +0100
committerTobias Brunner <tobias@strongswan.org>2014-02-12 14:34:31 +0100
commit34d3bfcf14b31011e7b880f7ad1dfeba27aaeae6 (patch)
tree45d8c0a54e1ac5f7454cf1f00b311aa48f5d705f /src/libstrongswan/library.c
parent4f8bd6d4049e2c1ce9aa33dd61522414fb078ec0 (diff)
downloadstrongswan-34d3bfcf14b31011e7b880f7ad1dfeba27aaeae6.tar.bz2
strongswan-34d3bfcf14b31011e7b880f7ad1dfeba27aaeae6.tar.xz
lib: Add global config namespace
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index 72fc2fa44..e0876ef9f 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -145,6 +145,7 @@ void library_deinit()
threads_deinit();
backtrace_deinit();
+ free((void*)this->public.ns);
free(this);
lib = NULL;
}
@@ -234,7 +235,7 @@ static bool check_memwipe()
/*
* see header file
*/
-bool library_init(char *settings)
+bool library_init(char *settings, const char *namespace)
{
private_library_t *this;
printf_hook_t *pfh;
@@ -250,6 +251,7 @@ bool library_init(char *settings)
.public = {
.get = _get,
.set = _set,
+ .ns = strdup(namespace ?: "libstrongswan"),
},
.ref = 1,
);