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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 13 11:16:01 MST 2007


Author: file
Date: Wed Jun 13 13:16:00 2007
New Revision: 69128

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69128
Log:
Merged revisions 69127 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69127 | file | 2007-06-13 14:12:48 -0400 (Wed, 13 Jun 2007) | 2 lines

Return group counting to previous behavior where you could only have one group per category. (issue #9711 reported by irroot)

........

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=69128&r1=69127&r2=69128
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Wed Jun 13 13:16:00 2007
@@ -806,12 +806,16 @@
 		len += strlen(category) + 1;
 	
 	AST_LIST_LOCK(&groups);
-	AST_LIST_TRAVERSE(&groups, gi, list) {
-		if (gi->chan == chan && !strcasecmp(gi->group, group) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
-			break;
-	}
+	AST_LIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) {
+		if ((gi->chan == chan) && ((ast_strlen_zero(category) && ast_strlen_zero(gi->category)) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category)))) {
+			AST_LIST_REMOVE_CURRENT(&groups, list);
+			free(gi);
+			break;
+		}
+	}
+	AST_LIST_TRAVERSE_SAFE_END
 	
-	if (!gi && (gi = calloc(1, len))) {
+	if ((gi = calloc(1, len))) {
 		gi->chan = chan;
 		gi->group = (char *) gi + sizeof(*gi);
 		strcpy(gi->group, group);



More information about the asterisk-commits mailing list