| version 1.150, 2007/12/16 21:25:59 |
version 1.151, 2008/02/06 21:57:54 |
| Line 660 soclose(struct socket *so) |
|
| Line 660 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) && |
if ((so->so_state & SS_ISDISCONNECTING) && so->so_nbio) |
| (so->so_state & SS_NBIO)) |
|
| goto drop; |
goto drop; |
| while (so->so_state & SS_ISCONNECTED) { |
while (so->so_state & SS_ISCONNECTED) { |
| error = tsleep((void *)&so->so_timeo, |
error = tsleep((void *)&so->so_timeo, |
| Line 870 sosend(struct socket *so, struct mbuf *a |
|
| Line 869 sosend(struct socket *so, struct mbuf *a |
|
| snderr(EMSGSIZE); |
snderr(EMSGSIZE); |
| 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_state & SS_NBIO) |
if (so->so_nbio) |
| snderr(EWOULDBLOCK); |
snderr(EWOULDBLOCK); |
| sbunlock(&so->so_snd); |
sbunlock(&so->so_snd); |
| error = sbwait(&so->so_snd); |
error = sbwait(&so->so_snd); |
| Line 1110 soreceive(struct socket *so, struct mbuf |
|
| Line 1109 soreceive(struct socket *so, struct mbuf |
|
| } |
} |
| if (uio->uio_resid == 0) |
if (uio->uio_resid == 0) |
| goto release; |
goto release; |
| if ((so->so_state & SS_NBIO) || (flags & MSG_DONTWAIT)) { |
if (so->so_nbio || (flags & MSG_DONTWAIT)) { |
| error = EWOULDBLOCK; |
error = EWOULDBLOCK; |
| goto release; |
goto release; |
| } |
} |