[svn-commits] tilghman: branch 1.4 r117523 - /branches/1.4/pbx/pbx_spool.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 21 13:44:54 CDT 2008


Author: tilghman
Date: Wed May 21 13:44:53 2008
New Revision: 117523

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117523
Log:
Revert accidental commit of the last change

Modified:
    branches/1.4/pbx/pbx_spool.c

Modified: branches/1.4/pbx/pbx_spool.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_spool.c?view=diff&rev=117523&r1=117522&r2=117523
==============================================================================
--- branches/1.4/pbx/pbx_spool.c (original)
+++ branches/1.4/pbx/pbx_spool.c Wed May 21 13:44:53 2008
@@ -128,11 +128,7 @@
 	char buf[256];
 	char *c, *c2;
 	int lineno = 0;
-	struct ast_variable *var, *last = o->vars;
-
-	while (last && last->next) {
-		last = last->next;
-	}
+	struct ast_variable *var;
 
 	while(fgets(buf, sizeof(buf), f)) {
 		lineno++;
@@ -226,13 +222,8 @@
 					if (c2) {
 						var = ast_variable_new(c, c2);
 						if (var) {
-							/* Always insert at the end, because some people want to treat the spool file as a script */
-							if (last) {
-								last->next = var;
-							} else {
-								o->vars = var;
-							}
-							last = var;
+							var->next = o->vars;
+							o->vars = var;
 						}
 					} else
 						ast_log(LOG_WARNING, "Malformed \"%s\" argument.  Should be \"%s: variable=value\"\n", buf, buf);




More information about the svn-commits mailing list