make GROUP set group@categroy instead of category@group
ensure that GROUP_COUNT still returns "0", even if no group was found git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6245 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
5912042b64
commit
58b2bb1ecc
|
@ -36,7 +36,7 @@ static char *group_count_function_read(struct ast_channel *chan, char *cmd, char
|
||||||
if ((grp = pbx_builtin_getvar_helper(chan, category)))
|
if ((grp = pbx_builtin_getvar_helper(chan, category)))
|
||||||
ast_copy_string(group, grp, sizeof(group));
|
ast_copy_string(group, grp, sizeof(group));
|
||||||
else
|
else
|
||||||
return buf;
|
ast_log(LOG_NOTICE, "No group could be found for channel '%s'\n", chan->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
count = ast_app_group_get_count(group, category);
|
count = ast_app_group_get_count(group, category);
|
||||||
|
@ -109,7 +109,7 @@ static void group_function_write(struct ast_channel *chan, char *cmd, char *data
|
||||||
char grpcat[256];
|
char grpcat[256];
|
||||||
|
|
||||||
if (data && !ast_strlen_zero(data)) {
|
if (data && !ast_strlen_zero(data)) {
|
||||||
snprintf(grpcat, sizeof(grpcat), "%s@%s", data, value);
|
snprintf(grpcat, sizeof(grpcat), "%s@%s", value, data);
|
||||||
} else {
|
} else {
|
||||||
ast_copy_string(grpcat, value, sizeof(grpcat));
|
ast_copy_string(grpcat, value, sizeof(grpcat));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue