| version 1.210, 2012/03/16 06:47:37 |
version 1.211, 2012/07/09 04:35:13 |
| Line 1132 soreceive(struct socket *so, struct mbuf |
|
| Line 1132 soreceive(struct socket *so, struct mbuf |
|
| { |
{ |
| struct lwp *l = curlwp; |
struct lwp *l = curlwp; |
| struct mbuf *m, **mp, *mt; |
struct mbuf *m, **mp, *mt; |
| int atomic, flags, len, error, s, offset, moff, type, orig_resid; |
size_t len, offset, moff, orig_resid; |
| |
int atomic, flags, error, s, type; |
| const struct protosw *pr; |
const struct protosw *pr; |
| struct mbuf *nextrecord; |
struct mbuf *nextrecord; |
| int mbuf_removed = 0; |
int mbuf_removed = 0; |
| Line 1165 soreceive(struct socket *so, struct mbuf |
|
| Line 1166 soreceive(struct socket *so, struct mbuf |
|
| goto bad; |
goto bad; |
| do { |
do { |
| error = uiomove(mtod(m, void *), |
error = uiomove(mtod(m, void *), |
| (int) min(uio->uio_resid, m->m_len), uio); |
MIN(uio->uio_resid, m->m_len), uio); |
| m = m_free(m); |
m = m_free(m); |
| } while (uio->uio_resid > 0 && error == 0 && m); |
} while (uio->uio_resid > 0 && error == 0 && m); |
| bad: |
bad: |
| Line 1419 soreceive(struct socket *so, struct mbuf |
|
| Line 1420 soreceive(struct socket *so, struct mbuf |
|
| SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); |
SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove"); |
| sounlock(so); |
sounlock(so); |
| splx(s); |
splx(s); |
| error = uiomove(mtod(m, char *) + moff, (int)len, uio); |
error = uiomove(mtod(m, char *) + moff, len, uio); |
| s = splsoftnet(); |
s = splsoftnet(); |
| solock(so); |
solock(so); |
| if (error != 0) { |
if (error != 0) { |