aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authorautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-10 15:28:47 +0000
committerautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-10 15:28:47 +0000
commitbe513624d46a5db0a706ef4db6d76a85f6ff22b8 (patch)
treed815aada6158097233d26cb2a2b70aa155137f18 /app.c
parent8793d5bf3e1ff068f430b683e4fac355d49dcb5f (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@74312 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.c b/app.c
index 33b318dd2..9d1849c77 100644
--- a/app.c
+++ b/app.c
@@ -1084,7 +1084,7 @@ int ast_app_group_get_count(char *group, 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);
@@ -1107,7 +1107,7 @@ int ast_app_group_match_get_count(char *groupmatch, char *category)
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE(&groups, gi, list) {
- if (!regexec(&regexbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || !strcasecmp(gi->category, category)))
+ if (!regexec(&regexbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
count++;
}
AST_LIST_UNLOCK(&groups);