[asterisk-commits] russell: branch group/newcdr r202221 - /team/group/newcdr/cel/cel_manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jun 20 15:36:10 CDT 2009


Author: russell
Date: Sat Jun 20 15:35:59 2009
New Revision: 202221

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202221
Log:
Fix an infinite loop in config parsing

Modified:
    team/group/newcdr/cel/cel_manager.c

Modified: team/group/newcdr/cel/cel_manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_manager.c?view=diff&rev=202221&r1=202220&r2=202221
==============================================================================
--- team/group/newcdr/cel/cel_manager.c (original)
+++ team/group/newcdr/cel/cel_manager.c Sat Jun 20 15:35:59 2009
@@ -100,8 +100,7 @@
 			}
 		} else if (!strcasecmp(cat, "mappings")) {
 			customfields = ast_str_create(CUSTOM_FIELDS_BUF_SIZE);
-			v = ast_variable_browse(cfg, cat);
-			while (v) {
+			for (v = ast_variable_browse(cfg, cat); v; v = v->next) {
 				if (customfields && !ast_strlen_zero(v->name) && !ast_strlen_zero(v->value)) {
 					if ((ast_str_strlen(customfields) + strlen(v->value) + strlen(v->name) + 14) < ast_str_size(customfields)) {
 						ast_str_append(&customfields, -1, "%s: ${CDR(%s)}\r\n", v->value, v->name);




More information about the asterisk-commits mailing list