mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
correct behavior change introduced by issue #5448 patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
config.c
7
config.c
@@ -150,15 +150,10 @@ char *ast_variable_retrieve(const struct ast_config *config, const char *categor
|
|||||||
struct ast_variable *v;
|
struct ast_variable *v;
|
||||||
|
|
||||||
if (category) {
|
if (category) {
|
||||||
char *val = NULL;
|
|
||||||
for (v = ast_variable_browse(config, category); v; v = v->next) {
|
for (v = ast_variable_browse(config, category); v; v = v->next) {
|
||||||
if (variable == v->name)
|
|
||||||
return v->value;
|
|
||||||
if (!strcasecmp(variable, v->name))
|
if (!strcasecmp(variable, v->name))
|
||||||
val = v->value;
|
return v->value;
|
||||||
}
|
}
|
||||||
if (val)
|
|
||||||
return val;
|
|
||||||
} else {
|
} else {
|
||||||
struct ast_category *cat;
|
struct ast_category *cat;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user