[asterisk-commits] kpfleming: branch 1.4 r49680 -
/branches/1.4/main/manager.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jan 5 15:52:38 MST 2007
Author: kpfleming
Date: Fri Jan 5 16:52:37 2007
New Revision: 49680
URL: http://svn.digium.com/view/asterisk?view=rev&rev=49680
Log:
don't 'consume' the params list before we try to use it again
Modified:
branches/1.4/main/manager.c
Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=49680&r1=49679&r2=49680
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Fri Jan 5 16:52:37 2007
@@ -2458,10 +2458,10 @@
unsigned int x;
size_t hdrlen;
- 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