andre 845b471915 In soreceive_stream() don't drop an already dequeued mbuf chain by
overwriting the return mbuf pointer with newly received data after
a loop.  Instead append the new mbuf chain to the existing one.

Fix up sb_lastrecord when dequeuing mbuf's so that sbappend_stream()
doesn't get confused.

For the remainder copy case in the mbuf delivery part deduct the
copied length len instead of the whole mbuf length.  Additionally
don't depend on 'n' being being available which isn't true in the
case of MSG_PEEK.

Fix the MSG_WAITALL case by comparing against sb_hiwat.  Before
it was looping for every receive as sb_lowat normally is zero.
Add comment about issue with (MSG_WAITALL | MSG_PEEK) which isn't
properly handled.

Submitted by:	trociny (except for the change in last paragraph)
2012-10-29 12:31:12 +00:00
..
2012-10-27 22:13:42 +00:00
2012-10-28 02:55:51 +00:00
2012-10-10 08:36:38 +00:00
2012-10-24 18:21:22 +00:00
2012-09-14 22:00:03 +00:00
2012-10-10 08:36:38 +00:00
2012-04-16 10:33:46 +00:00
2012-10-23 02:20:11 +00:00
2012-10-10 08:36:38 +00:00