Use name from initialization to access settings in libcharon.

Also fixes several whitespace errors.
This commit is contained in:
Tobias Brunner
2012-05-03 13:57:04 +02:00
parent 18758e3d2e
commit 42500c274a
56 changed files with 279 additions and 220 deletions
@@ -216,11 +216,13 @@ coupling_validator_t *coupling_validator_create()
},
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
.max_couplings = lib->settings->get_int(lib->settings,
"charon.plugins.coupling.max", 1),
"%s.plugins.coupling.max", 1,
charon->name),
);
hash = lib->settings->get_str(lib->settings,
"charon.plugins.coupling.hash", "sha1");
"%s.plugins.coupling.hash", "sha1",
charon->name);
for (i = 0; i < countof(hash_types); i++)
{
if (strcaseeq(hash_types[i].name, hash))
@@ -238,7 +240,8 @@ coupling_validator_t *coupling_validator_create()
}
path = lib->settings->get_str(lib->settings,
"charon.plugins.coupling.file", NULL);
"%s.plugins.coupling.file", NULL,
charon->name);
if (!path)
{
DBG1(DBG_CFG, "coupling file path unspecified");