]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
jmls pointed out that unsetting the group and setting the group to the blank string...
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 25 Sep 2007 14:13:25 +0000 (14:13 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 25 Sep 2007 14:13:25 +0000 (14:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83773 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/app.c

index d65ff53f7a24297f62125ff896e08d2119e54656..c84bd0f54c88fd48058f9baa2f888623be0e5ae7 100644 (file)
@@ -814,8 +814,10 @@ int ast_app_group_set_channel(struct ast_channel *chan, const char *data)
                }
        }
        AST_LIST_TRAVERSE_SAFE_END
-       
-       if ((gi = calloc(1, len))) {
+
+       if (ast_strlen_zero(group)) {
+               /* Enable unsetting the group */
+       } else if ((gi = calloc(1, len))) {
                gi->chan = chan;
                gi->group = (char *) gi + sizeof(*gi);
                strcpy(gi->group, group);