kib 3fa3fc83d1 Item 1 in r248830 causes earlier exits from the sendfile(2), before
all requested data was sent.  The reason is that xfsize <= 0 condition
must not be tested at all if space == loopbytes.  Otherwise, the done
is set to 1, and sendfile(2) is aborted too early.

Instead of moving the condition to exiting the inner loop after the
xfersize check, directly check for the completed transfer before the
testing of the available space in the socket buffer, and revert item 1
of r248830.  It is arguably another bug to sleep waiting for socket
buffer space (or return EAGAIN for non-blocking socket) if all bytes
are already transferred.

Reported by:	pho
Discussed with:	scottl, gibbs
Tested by:	scottl (stable/9 backport), pho
2013-05-09 16:05:51 +00:00
..
2013-05-08 09:42:50 +00:00
2013-05-06 16:50:39 +00:00
2013-05-01 22:45:04 +00:00
2013-05-08 00:20:35 +00:00
2013-05-06 21:44:06 +00:00
2013-04-17 11:45:15 +00:00
MFC
2013-03-08 00:03:07 +00:00
MFC
2013-02-21 21:59:35 +00:00
2013-04-29 23:08:13 +00:00
MFC
2013-03-13 01:05:42 +00:00