[Asterisk-cvs] asterisk/funcs func_groupcount.c,1.4,1.5

russell at lists.digium.com russell at lists.digium.com
Wed Jul 27 18:36:48 CDT 2005


Update of /usr/cvsroot/asterisk/funcs
In directory mongoose.digium.com:/tmp/cvs-serv31512/funcs

Modified Files:
	func_groupcount.c 
Log Message:
don't crash if no group is specified (bug #4836)


Index: func_groupcount.c
===================================================================
RCS file: /usr/cvsroot/asterisk/funcs/func_groupcount.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- func_groupcount.c	6 Jun 2005 22:12:19 -0000	1.4
+++ func_groupcount.c	27 Jul 2005 22:43:18 -0000	1.5
@@ -33,8 +33,10 @@
 	ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category));
 
 	if (ast_strlen_zero(group)) {
-		grp = pbx_builtin_getvar_helper(chan, category);
-		ast_copy_string(group, grp, sizeof(group));
+		if ((grp = pbx_builtin_getvar_helper(chan, category)))
+			ast_copy_string(group, grp, sizeof(group));
+		else
+			return buf;
 	}
 
 	count = ast_app_group_get_count(group, category);




More information about the svn-commits mailing list