Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 124733
Collapse All | Expand All

(-)src/zlib.c (-8 / +7 lines)
Lines 221-235 Link Here
221
           point.  */
221
           point.  */
222
	assert (bd->size == 0);
222
	assert (bd->size == 0);
223
223
224
	/* This will work well in the server, because this call will
224
	/* On the server, this will do an unblocking read of as much data as is
225
	   do an unblocked read and fetch all the available data.  In
225
	 * available.  On the client, with a blocking input descriptor and the
226
	   the client, this will read a single byte from the stdio
226
	 * current fd_buffer implementation, this should read as much data as
227
	   stream, which will cause us to call inflate once per byte.
227
	 * is currently available, and at least 1 byte (or EOF), from the
228
	   It would be more efficient if we could make a call which
228
	 * underlying buffer.
229
	   would fetch all the available bytes, and at least one byte.  */
229
	 */
230
231
	status = (*cb->buf->input) (cb->buf->closure, bd->text,
230
	status = (*cb->buf->input) (cb->buf->closure, bd->text,
232
				    need, BUFFER_DATA_SIZE, &nread);
231
				    need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
233
232
234
	if (status == -2)
233
	if (status == -2)
235
	    /* Don't try to recover from memory allcoation errors.  */
234
	    /* Don't try to recover from memory allcoation errors.  */

Return to bug 124733