Scott Long 07dbf2c768 Several fixes and improvements to sendfile()
1.  If we wanted to send exactly as many bytes as the socket buffer is
    sized for, the inner loop of kern_sendfile() would see that the
    socket is full before seeing that it had no more bytes left to send.
    This would cause it to return EAGAIN to the caller instead of
    success.  Fix by changing the order that these conditions are tested.
2.  Simplify the calculation for the bytes to send in each iteration of
    the inner loop of kern_sendfile()
3.  Fix some calls with bogus arguments to sf_buf_ext().  These would
    only trigger on mbuf allocation failure, but would be hilariously
    bad if they did trigger.

Submitted by:	gibbs(3), andre(2)
Reviewed by:	emax, andre
Obtained from:	Netflix
MFC after:	1 week
2013-03-28 14:14:28 +00:00
..
2013-03-21 23:02:19 +00:00
2013-03-04 12:20:48 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2011-04-13 11:28:46 +00:00
2013-03-04 11:22:19 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2012-03-28 20:58:30 +00:00
2012-11-14 10:33:12 +00:00
2013-03-18 18:04:09 +00:00
2013-03-21 19:58:25 +00:00
2013-03-27 23:07:43 +00:00
2013-01-23 14:37:05 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
2012-01-26 16:35:09 +00:00
2012-09-14 21:28:56 +00:00
2013-03-02 00:53:12 +00:00
2013-02-17 11:48:16 +00:00
2013-03-21 23:02:19 +00:00
2013-03-21 23:02:19 +00:00
2012-01-02 12:12:10 +00:00
2012-10-25 09:05:21 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00
2013-03-02 00:53:12 +00:00