Commit fa686a25 authored by Mike Hibler's avatar Mike Hibler

Allow doloadinfo() to return more than the stock 2K of info.

At least for TCP based calls. We will need this for long-ish delta chains.
I didn't think this warranted a version number bump even though it is
possible that an old MFS that makes a UDP-based call will only wind up
getting the first line (image). The reasoning here is that MFSes that old
could only handle one line anyway in rc.frisbee!
parent f9f19502
...@@ -6136,6 +6136,12 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -6136,6 +6136,12 @@ COMMAND_PROTOTYPE(doloadinfo)
/* Tack on the newline, finally */ /* Tack on the newline, finally */
bufp += OUTPUT(bufp, ebufp - bufp, "\n"); bufp += OUTPUT(bufp, ebufp - bufp, "\n");
/* Output line at a time in case we have a lot of images */
if (nrows > 1) {
client_writeback(sock, buf, strlen(buf), tcp);
bufp = buf;
}
nrows--; nrows--;
} }
if (res) if (res)
...@@ -6160,6 +6166,7 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -6160,6 +6166,7 @@ COMMAND_PROTOTYPE(doloadinfo)
if (disableif) if (disableif)
free(disableif); free(disableif);
/* Output the final (or only, or null) line */
client_writeback(sock, buf, strlen(buf), tcp); client_writeback(sock, buf, strlen(buf), tcp);
if (verbose) if (verbose)
info("doloadinfo: %s", buf); info("doloadinfo: %s", buf);
......
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