mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Merged revisions 74264 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74264 | file | 2007-07-10 11:48:00 -0300 (Tue, 10 Jul 2007) | 2 lines Ensure the group information category exists before trying to do a string comparison with it. (issue #10171 reported by mlegas) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -843,7 +843,7 @@ int ast_app_group_get_count(const char *group, const char *category)
|
||||
|
||||
AST_LIST_LOCK(&groups);
|
||||
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++;
|
||||
}
|
||||
AST_LIST_UNLOCK(&groups);
|
||||
@@ -866,7 +866,7 @@ int ast_app_group_match_get_count(const char *groupmatch, const char *category)
|
||||
|
||||
AST_LIST_LOCK(&groups);
|
||||
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++;
|
||||
}
|
||||
AST_LIST_UNLOCK(&groups);
|
||||
|
Reference in New Issue
Block a user