[asterisk-commits] kpfleming: trunk r49681 - in /trunk: ./ main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 5 15:53:39 MST 2007


Author: kpfleming
Date: Fri Jan  5 16:53:38 2007
New Revision: 49681

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49681
Log:
Merged revisions 49680 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49680 | kpfleming | 2007-01-05 16:52:37 -0600 (Fri, 05 Jan 2007) | 2 lines

don't 'consume' the params list before we try to use it again

........

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=49681&r1=49680&r2=49681
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Jan  5 16:53:38 2007
@@ -2720,10 +2720,10 @@
 	unlink(template);
 	s->f = fdopen(s->fd, "w+");
 
-	for (x = 0; params && (x < AST_MAX_MANHEADERS); x++, params = params->next) {
-		hdrlen = strlen(params->name) + strlen(params->value) + 3;
+	for (x = 0, v = params; v && (x < AST_MAX_MANHEADERS); x++, v = v->next) {
+		hdrlen = strlen(v->name) + strlen(v->value) + 3;
 		m.headers[m.hdrcount] = alloca(hdrlen);
-		snprintf((char *) m.headers[m.hdrcount], hdrlen, "%s: %s", params->name, params->value);
+		snprintf((char *) m.headers[m.hdrcount], hdrlen, "%s: %s", v->name, v->value);
 		m.hdrcount = x + 1;
 	}
 



More information about the asterisk-commits mailing list