aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-25 14:13:25 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-25 14:13:25 +0000
commit6bbac41d1f133be88318601beef6607f9baff17e (patch)
treeee5d66bba39fcf5a0f742974e5abbe26324b4a58 /main/app.c
parent288f58d17cf9009bcdf97cb79800f236c3405466 (diff)
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
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c6
1 files 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);