Index: config.c =================================================================== RCS file: /usr/cvsroot/asterisk/config.c,v retrieving revision 1.76 diff -u -r1.76 config.c --- config.c 14 Sep 2005 20:46:49 -0000 1.76 +++ config.c 16 Oct 2005 19:10:25 -0000 @@ -150,12 +150,15 @@ struct ast_variable *v; if (category) { - for (v = ast_variable_browse(config, category); v; v = v->next) + char *val = NULL; + for (v = ast_variable_browse(config, category); v; v = v->next) { if (variable == v->name) return v->value; - for (v = ast_variable_browse(config, category); v; v = v->next) if (!strcasecmp(variable, v->name)) - return v->value; + val = v->value; + } + if (val) + return val; } else { struct ast_category *cat;