Mailing List Archive

r1859 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-08-19 23:20:48 +0200 (Sun, 19 Aug 2007)
New Revision: 1859

Modified:
trunk/varnish-cache/bin/varnishd/mgt_cli.c
Log:
Reset the cli buffer when we have soaked up all it contained.
Otherwise we will for ever be repeating the same command over and over,
no matter what the input to the cli might be.


Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-08-19 21:19:46 UTC (rev 1858)
+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-08-19 21:20:48 UTC (rev 1859)
@@ -337,7 +337,8 @@
assert(q == cp->buf + cp->nbuf);
cp->nbuf -= (p - cp->buf);
memmove(cp->buf, p, cp->nbuf);
- }
+ } else
+ cp->nbuf = 0;
return (0);

cli_close: