diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-01-28 16:58:34 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-02-12 14:34:32 +0100 |
commit | eb9b375aa1b65b0af3ceeae9a0bafc39f4329452 (patch) | |
tree | e68d5e338d138dacd95867c1a815ef27f7eca2e1 /src/libhydra | |
parent | 8dc6e716325135bd6263158d507c1403bbb48261 (diff) | |
download | strongswan-eb9b375aa1b65b0af3ceeae9a0bafc39f4329452.tar.bz2 strongswan-eb9b375aa1b65b0af3ceeae9a0bafc39f4329452.tar.xz |
attr-sql: Use namespace for attr-sql config, with fallback
Diffstat (limited to 'src/libhydra')
-rw-r--r-- | src/libhydra/plugins/attr_sql/attr_sql_plugin.c | 4 | ||||
-rw-r--r-- | src/libhydra/plugins/attr_sql/sql_attribute.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libhydra/plugins/attr_sql/attr_sql_plugin.c b/src/libhydra/plugins/attr_sql/attr_sql_plugin.c index 702872c57..dde90051a 100644 --- a/src/libhydra/plugins/attr_sql/attr_sql_plugin.c +++ b/src/libhydra/plugins/attr_sql/attr_sql_plugin.c @@ -61,7 +61,7 @@ static bool open_database(private_attr_sql_plugin_t *this, char *uri; uri = lib->settings->get_str(lib->settings, - "libhydra.plugins.attr-sql.database", NULL); + "%s.plugins.attr-sql.database", NULL, lib->ns); if (!uri) { DBG1(DBG_CFG, "attr-sql plugin: database URI not set"); @@ -122,6 +122,8 @@ plugin_t *attr_sql_plugin_create() }, }, ); + lib->settings->add_fallback(lib->settings, "%s.plugins.attr-sql", + "libhydra.plugins.attr-sql", lib->ns); return &this->public.plugin; } diff --git a/src/libhydra/plugins/attr_sql/sql_attribute.c b/src/libhydra/plugins/attr_sql/sql_attribute.c index 0a06c419f..d527c3fba 100644 --- a/src/libhydra/plugins/attr_sql/sql_attribute.c +++ b/src/libhydra/plugins/attr_sql/sql_attribute.c @@ -457,7 +457,7 @@ sql_attribute_t *sql_attribute_create(database_t *db) }, .db = db, .history = lib->settings->get_bool(lib->settings, - "libhydra.plugins.attr-sql.lease_history", TRUE), + "%s.plugins.attr-sql.lease_history", TRUE, lib->ns), ); /* close any "online" leases in the case we crashed */ |