From 56b4420d6402fad8c65e3531f4bc255a1adcd33f Mon Sep 17 00:00:00 2001 From: file Date: Thu, 10 Jan 2008 15:07:12 +0000 Subject: Don't try to copy the category from the group if no category exists. (closes issue #11724) Reported by: IgorG Patches: group_count.v1.patch uploaded by IgorG (license 20) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97697 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_groupcount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c index 281d9d055..bb2bcf49c 100644 --- a/funcs/func_groupcount.c +++ b/funcs/func_groupcount.c @@ -58,7 +58,8 @@ static int group_count_function_read(struct ast_channel *chan, char *cmd, } if (gi) { ast_copy_string(group, gi->group, sizeof(group)); - ast_copy_string(category, gi->category, sizeof(category)); + if (!ast_strlen_zero(gi->category)) + ast_copy_string(category, gi->category, sizeof(category)); } ast_app_group_list_unlock(); } -- cgit v1.2.3