[asterisk-commits] mmichelson: trunk r114832 - /trunk/apps/app_directory.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 29 12:31:26 CDT 2008


Author: mmichelson
Date: Tue Apr 29 12:31:26 2008
New Revision: 114832

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114832
Log:
Fix a crash happening in app_directory. This crash would occur if a users.conf existed.


Modified:
    trunk/apps/app_directory.c

Modified: trunk/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_directory.c?view=diff&rev=114832&r1=114831&r2=114832
==============================================================================
--- trunk/apps/app_directory.c (original)
+++ trunk/apps/app_directory.c Tue Apr 29 12:31:26 2008
@@ -625,7 +625,6 @@
 		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 @@
 
 			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 @@
 			AST_LIST_INSERT_TAIL(alist, item, entry);
 		}
 	}
-
 	return 0;
 }
 




More information about the asterisk-commits mailing list