|
|
@ -97,15 +97,13 @@ static char *group_function_read(struct ast_channel *chan, char *cmd, char *data
|
|
|
|
|
|
|
|
|
|
|
|
ast_app_group_list_lock();
|
|
|
|
ast_app_group_list_lock();
|
|
|
|
|
|
|
|
|
|
|
|
gi = ast_app_group_list_head();
|
|
|
|
for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, list)) {
|
|
|
|
while (gi) {
|
|
|
|
|
|
|
|
if (gi->chan != chan)
|
|
|
|
if (gi->chan != chan)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
if (ast_strlen_zero(data))
|
|
|
|
if (ast_strlen_zero(data))
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
if (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, data))
|
|
|
|
if (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, data))
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
gi = AST_LIST_NEXT(gi, list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (gi)
|
|
|
|
if (gi)
|
|
|
@ -150,8 +148,7 @@ static char *group_list_function_read(struct ast_channel *chan, char *cmd, char
|
|
|
|
|
|
|
|
|
|
|
|
ast_app_group_list_lock();
|
|
|
|
ast_app_group_list_lock();
|
|
|
|
|
|
|
|
|
|
|
|
gi = ast_app_group_list_head();
|
|
|
|
for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, list)) {
|
|
|
|
while (gi) {
|
|
|
|
|
|
|
|
if (gi->chan != chan)
|
|
|
|
if (gi->chan != chan)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
if (!ast_strlen_zero(tmp1)) {
|
|
|
|
if (!ast_strlen_zero(tmp1)) {
|
|
|
@ -166,7 +163,6 @@ static char *group_list_function_read(struct ast_channel *chan, char *cmd, char
|
|
|
|
else
|
|
|
|
else
|
|
|
|
snprintf(tmp1, sizeof(tmp1), "%s", gi->group);
|
|
|
|
snprintf(tmp1, sizeof(tmp1), "%s", gi->group);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gi = AST_LIST_NEXT(gi, list);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ast_app_group_list_unlock();
|
|
|
|
ast_app_group_list_unlock();
|
|
|
|