version 1.111.2.11, 2008/01/21 09:46:30 |
version 1.111.2.12, 2008/02/11 14:59:58 |
Line 658 soclose(struct socket *so) |
|
Line 658 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 868 sosend(struct socket *so, struct mbuf *a |
|
Line 867 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 1108 soreceive(struct socket *so, struct mbuf |
|
Line 1107 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; |
} |
} |