From 012a146f334ab69ac9d6c232e79060577bf40273 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 30 May 2012 17:26:37 +0200 Subject: use option_is_set() config parser helper. Guenther Signed-off-by: Simo Sorce --- proxy/src/gp_config.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c index 384f0a4..a774957 100644 --- a/proxy/src/gp_config.c +++ b/proxy/src/gp_config.c @@ -176,10 +176,7 @@ static int load_services(struct gp_config *cfg, dictionary *dict) value = get_char_value(dict, secname, "trusted"); if (value != NULL) { - if (strcasecmp(value, "true") == 0 || - strcasecmp(value, "1") == 0 || - strcasecmp(value, "yes") == 0) { - + if (option_is_set(value)) { cfg->svcs[n]->trusted = true; } } @@ -246,9 +243,7 @@ int load_config(struct gp_config *cfg) tmpstr = iniparser_getstring(d, "gssproxy:debug", NULL); if (tmpstr) { - if (strcasecmp(tmpstr, "1") == 0 || - strcasecmp(tmpstr, "on") == 0 || - strcasecmp(tmpstr, "true") == 0) { + if (option_is_set(tmpstr)) { gp_debug_enable(); } } -- cgit