Fix client to log long input lines untruncated

They can still get split by output arriving between two reads from
input, but that's unavoidable, because the client is designed to read
and write big chunks, not lines.
This commit is contained in:
Markus Armbruster 2011-04-14 20:42:42 +02:00
parent 819e28421e
commit e8b98f308e

View file

@ -432,11 +432,11 @@ recv_input(int fd, struct ring *inbuf)
assert(ch != EOF);
if (ch != '\r' && lbuf_putc(&cmdbuf, ch) > 0) {
line = lbuf_line(&cmdbuf);
if (auxfp)
fputs(line, auxfp);
save_input(line);
lbuf_init(&cmdbuf);
}
if (auxfp)
putc(ch, auxfp);
}
return res;