Check for SS_NBIO in so->so_state instead of sb->sb_flags in

soreceive_stream().

Differential Revision:	https://reviews.freebsd.org/D1299
Reviewed by:	bz, gnn
MFC after:	1 week
This commit is contained in:
jhb 2014-12-15 17:52:08 +00:00
parent 80ecdefe46
commit 93ef12f586
2 changed files with 2 additions and 2 deletions

View File

@ -1173,7 +1173,7 @@ restart:
/* Socket buffer got some data that we shall deliver now. */
if (sbused(sb) && !(flags & MSG_WAITALL) &&
((sb->sb_flags & SS_NBIO) ||
((so->so_state & SS_NBIO) ||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
sbused(sb) >= sb->sb_lowat ||
sbused(sb) >= uio->uio_resid ||

View File

@ -2002,7 +2002,7 @@ restart:
/* Socket buffer got some data that we shall deliver now. */
if (sbavail(sb) > 0 && !(flags & MSG_WAITALL) &&
((sb->sb_flags & SS_NBIO) ||
((so->so_state & SS_NBIO) ||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
sbavail(sb) >= sb->sb_lowat ||
sbavail(sb) >= uio->uio_resid ||