aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-29 17:31:26 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-29 17:31:26 +0000
commitb473c5b6bfab89e715bb46b54e676716b9b41090 (patch)
tree27a0841aa4b3cb9af3b5913e0ed8d9e5df2b611a /apps/app_directory.c
parent54440f480cd65047e521d425855e0356be1c17a8 (diff)
Fix a crash happening in app_directory. This crash would occur if a users.conf existed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114832 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_directory.c')
-rw-r--r--apps/app_directory.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 981e1f1de..2be28e90d 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -625,7 +625,6 @@ static int search_directory(const char *context, struct ast_config *vmcfg, struc
AST_LIST_INSERT_TAIL(alist, item, entry);
}
-
if (ucfg) {
for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
const char *pos;
@@ -641,10 +640,10 @@ static int search_directory(const char *context, struct ast_config *vmcfg, struc
res = 0;
if (ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
- res = check_match(&item, pos, v->name, ext, 0 /* use_first_name */);
+ res = check_match(&item, pos, cat, ext, 0 /* use_first_name */);
}
if (!res && ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
- res = check_match(&item, pos, v->name, ext, 1 /* use_first_name */);
+ res = check_match(&item, pos, cat, ext, 1 /* use_first_name */);
}
if (!res)
@@ -655,7 +654,6 @@ static int search_directory(const char *context, struct ast_config *vmcfg, struc
AST_LIST_INSERT_TAIL(alist, item, entry);
}
}
-
return 0;
}