Skip to content

Commit

Permalink
use option_is_set() config parser helper.
Browse files Browse the repository at this point in the history
Guenther

Signed-off-by: Simo Sorce <simo@redhat.com>
  • Loading branch information
Günther Deschner authored and simo5 committed May 31, 2012
1 parent 91caa18 commit 012a146
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions proxy/src/gp_config.c
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 012a146

Please sign in to comment.