summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-04-03 20:31:10 +0000
committerjhb <jhb@FreeBSD.org>2013-04-03 20:31:10 +0000
commitcb3494ff31cbd5420f526fd16fd97df531bc2bcc (patch)
treefeefa536e8a27e410dc6110896a25d71e59facd9 /sys
parente9d5bc41d6b87b2bccb3ee7576d76d2783fadb2f (diff)
downloadFreeBSD-src-cb3494ff31cbd5420f526fd16fd97df531bc2bcc.zip
FreeBSD-src-cb3494ff31cbd5420f526fd16fd97df531bc2bcc.tar.gz
Check for SS_NBIO in the socket state field rather than socket buffer
flags. Submitted by: Vijay Singh MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
index c915fb3..f02c333 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -1267,7 +1267,7 @@ sdp_sorecv(struct socket *so, struct sockaddr **psa, struct uio *uio,
/* Socket buffer is empty and we shall not block. */
if (sb->sb_cc == 0 &&
- ((sb->sb_flags & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) {
+ ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) {
error = EAGAIN;
goto out;
}
@@ -1297,7 +1297,7 @@ restart:
/* Socket buffer got some data that we shall deliver now. */
if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) &&
- ((sb->sb_flags & SS_NBIO) ||
+ ((so->so_state & SS_NBIO) ||
(flags & (MSG_DONTWAIT|MSG_NBIO)) ||
sb->sb_cc >= sb->sb_lowat ||
sb->sb_cc >= uio->uio_resid ||
OpenPOWER on IntegriCloud