From 6bbac41d1f133be88318601beef6607f9baff17e Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 25 Sep 2007 14:13:25 +0000 Subject: jmls pointed out that unsetting the group and setting the group to the blank string aren't quite the same. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83773 f38db490-d61c-443f-a65b-d21fe96a405b --- main/app.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/app.c b/main/app.c index d65ff53f7..c84bd0f54 100644 --- a/main/app.c +++ b/main/app.c @@ -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); -- cgit v1.2.3