|
|
@ -1084,7 +1084,7 @@ int ast_app_group_get_count(char *group, char *category)
|
|
|
|
|
|
|
|
|
|
|
|
AST_LIST_LOCK(&groups);
|
|
|
|
AST_LIST_LOCK(&groups);
|
|
|
|
AST_LIST_TRAVERSE(&groups, gi, list) {
|
|
|
|
AST_LIST_TRAVERSE(&groups, gi, list) {
|
|
|
|
if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || !strcasecmp(gi->category, category)))
|
|
|
|
if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
|
|
|
|
count++;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AST_LIST_UNLOCK(&groups);
|
|
|
|
AST_LIST_UNLOCK(&groups);
|
|
|
@ -1107,7 +1107,7 @@ int ast_app_group_match_get_count(char *groupmatch, char *category)
|
|
|
|
|
|
|
|
|
|
|
|
AST_LIST_LOCK(&groups);
|
|
|
|
AST_LIST_LOCK(&groups);
|
|
|
|
AST_LIST_TRAVERSE(&groups, gi, list) {
|
|
|
|
AST_LIST_TRAVERSE(&groups, gi, list) {
|
|
|
|
if (!regexec(®exbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || !strcasecmp(gi->category, category)))
|
|
|
|
if (!regexec(®exbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
|
|
|
|
count++;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AST_LIST_UNLOCK(&groups);
|
|
|
|
AST_LIST_UNLOCK(&groups);
|
|
|
|