Date: Wed, 3 Apr 2013 20:31:11 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249066 - head/sys/ofed/drivers/infiniband/ulp/sdp Message-ID: <201304032031.r33KVBXg067419@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Apr 3 20:31:10 2013 New Revision: 249066 URL: http://svnweb.freebsd.org/changeset/base/249066 Log: Check for SS_NBIO in the socket state field rather than socket buffer flags. Submitted by: Vijay Singh MFC after: 1 week Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Wed Apr 3 20:26:52 2013 (r249065) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Wed Apr 3 20:31:10 2013 (r249066) @@ -1267,7 +1267,7 @@ sdp_sorecv(struct socket *so, struct soc /* 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 ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304032031.r33KVBXg067419>