From 7cf2eecaf6140f8e24807252f0200b9e2697def3 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Wed, 21 May 2008 18:44:53 +0000 Subject: [PATCH] Revert accidental commit of the last change git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117523 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- pbx/pbx_spool.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 9316971421..8cf38a1165 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -128,11 +128,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) 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 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) 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);