Commit c95ad5c3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1859 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent bc637056
......@@ -337,7 +337,8 @@ mgt_cli_callback(struct ev *e, int what)
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment