[Asterisk-cvs] asterisk pbx.c,1.165,1.166

anthm at lists.digium.com anthm at lists.digium.com
Tue Oct 26 22:22:54 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4735

Modified Files:
	pbx.c 
Log Message:
even more paranoid serialize code

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- pbx.c	27 Oct 2004 01:34:06 -0000	1.165
+++ pbx.c	27 Oct 2004 02:26:17 -0000	1.166
@@ -4928,14 +4928,15 @@
 	if (chan) {
 		headp=&chan->varshead;
 		AST_LIST_TRAVERSE(headp,variables,entries) {
-			if(chan && variables && (var=ast_var_name(variables)) && (val=ast_var_value(variables))) {
+			if(chan && variables && (var=ast_var_name(variables)) && (val=ast_var_value(variables)) && !ast_strlen_zero(var) && !ast_strlen_zero(val)) {
 				snprintf(buf + strlen(buf), size - strlen(buf), "%s=%s\n", var, val);
 				if(strlen(buf) >= size) {
 					ast_log(LOG_ERROR,"Data Buffer Size Exceeded!\n");
 					break;
 				}
 				total++;
-			}
+			} else 
+				break;
 		}
 	}
 	




More information about the svn-commits mailing list