Samuel Mikes <smikes(a)alumni.hmc.edu> writes:
I tracked it down to the use of read_line() in the output-producing
cases of gnuclient; read_line only reads up to the first "\n" and
stops, even if there's more output. The attached patch provides a
fix which incidentally allows an aribtrary amount of data (not just
GSERV_BUFSZ) to be received by gnuclient.
I like the idea but your patch is not really the right one anyway.
+ while ((length=read(s,result+offset,1)>0) &&
+ result[offset] != EOT_CHR)
Note: The server does NOT send an EOT_CHR as far as I can see. It will
work any way because the server closes the socket.
more important: ALWAYS check the results of mallocs!
A better way to fix this would be to just copy everything out to
stdout without any buffering.
Jan
P.S. If this counts as a bug fix I could try to write somthing to into
21.0