Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check for SS_NBIO in the socket state field rather than socket buffer

flags.

Submitted by:	Vijay Singh
MFC after:	1 week
  • Loading branch information...
commit cb3494ff31cbd5420f526fd16fd97df531bc2bcc 1 parent e9d5bc4
@bsdjhb bsdjhb authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
View
4 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 @@ sdp_sorecv(struct socket *so, struct sockaddr **psa, struct uio *uio,
/* 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 ||
Please sign in to comment.
Something went wrong with that request. Please try again.