| version 1.205, 2011/07/02 17:53:50 |
version 1.206, 2011/12/20 23:56:28 |
| Line 741 soclose(struct socket *so) |
|
| Line 741 soclose(struct socket *so) |
|
| goto drop; |
goto drop; |
| } |
} |
| if (so->so_options & SO_LINGER) { |
if (so->so_options & SO_LINGER) { |
| if ((so->so_state & SS_ISDISCONNECTING) && so->so_nbio) |
if ((so->so_state & (SS_ISDISCONNECTING|SS_NBIO)) == |
| |
(SS_ISDISCONNECTING|SS_NBIO)) |
| goto drop; |
goto drop; |
| while (so->so_state & SS_ISCONNECTED) { |
while (so->so_state & SS_ISCONNECTED) { |
| error = sowait(so, true, so->so_linger * hz); |
error = sowait(so, true, so->so_linger * hz); |
| Line 961 sosend(struct socket *so, struct mbuf *a |
|
| Line 962 sosend(struct socket *so, struct mbuf *a |
|
| } |
} |
| if (space < resid + clen && |
if (space < resid + clen && |
| (atomic || space < so->so_snd.sb_lowat || space < clen)) { |
(atomic || space < so->so_snd.sb_lowat || space < clen)) { |
| if (so->so_nbio) { |
if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) { |
| error = EWOULDBLOCK; |
error = EWOULDBLOCK; |
| goto release; |
goto release; |
| } |
} |
| Line 1257 soreceive(struct socket *so, struct mbuf |
|
| Line 1258 soreceive(struct socket *so, struct mbuf |
|
| } |
} |
| if (uio->uio_resid == 0) |
if (uio->uio_resid == 0) |
| goto release; |
goto release; |
| if (so->so_nbio || (flags & MSG_DONTWAIT)) { |
if ((so->so_state & SS_NBIO) || |
| |
(flags & (MSG_DONTWAIT|MSG_NBIO))) { |
| error = EWOULDBLOCK; |
error = EWOULDBLOCK; |
| goto release; |
goto release; |
| } |
} |