]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't try to copy the category from the group if no category exists.
authorJoshua Colp <jcolp@digium.com>
Thu, 10 Jan 2008 15:07:12 +0000 (15:07 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 10 Jan 2008 15:07:12 +0000 (15:07 +0000)
(closes issue #11724)
Reported by: IgorG
Patches:
      group_count.v1.patch uploaded by IgorG (license 20)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97697 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_groupcount.c

index 281d9d0554ad2d6ce01af23922fe8be5d0978dbb..bb2bcf49c1927c3d8cd3283bb2337757ae53a01e 100644 (file)
@@ -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();
        }