summaryrefslogtreecommitdiff
path: root/src/pool/pool.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
committerYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
commit15fb7904f4431a6e7c305fd08732458f7f885e7e (patch)
treec93b60ee813af70509f00f34e29ebec311762427 /src/pool/pool.c
parent5313d2d78ca150515f7f5eb39801c100690b6b29 (diff)
downloadvyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.tar.gz
vyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.zip
Imported Upstream version 5.1.2
Diffstat (limited to 'src/pool/pool.c')
-rw-r--r--src/pool/pool.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pool/pool.c b/src/pool/pool.c
index 05043cd8c..265974860 100644
--- a/src/pool/pool.c
+++ b/src/pool/pool.c
@@ -1212,7 +1212,7 @@ int main(int argc, char *argv[])
atexit(library_deinit);
/* initialize library */
- if (!library_init(NULL))
+ if (!library_init(NULL, "pool"))
{
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
@@ -1227,11 +1227,16 @@ int main(int argc, char *argv[])
{
exit(SS_RC_INITIALIZATION_FAILED);
}
-
- uri = lib->settings->get_str(lib->settings, "libhydra.plugins.attr-sql.database", NULL);
+ /* TODO: make database URI or setting key configurable via command line */
+ uri = lib->settings->get_str(lib->settings,
+ "pool.database",
+ lib->settings->get_str(lib->settings,
+ "charon.plugins.attr-sql.database",
+ lib->settings->get_str(lib->settings,
+ "libhydra.plugins.attr-sql.database", NULL)));
if (!uri)
{
- fprintf(stderr, "database URI libhydra.plugins.attr-sql.database not set.\n");
+ fprintf(stderr, "database URI pool.database not set.\n");
exit(SS_RC_INITIALIZATION_FAILED);
}
db = lib->db->create(lib->db, uri);