[asterisk-commits] file: branch 1.4 r74265 - in /branches/1.4: ./ main/app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 10 09:50:01 CDT 2007


Author: file
Date: Tue Jul 10 09:50:00 2007
New Revision: 74265

URL: http://svn.digium.com/view/asterisk?view=rev&rev=74265
Log:
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)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/main/app.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/app.c?view=diff&rev=74265&r1=74264&r2=74265
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Tue Jul 10 09:50:00 2007
@@ -843,7 +843,7 @@
 	
 	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 @@
 
 	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);




More information about the asterisk-commits mailing list