diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-03 21:03:28 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-03 21:03:28 -0500 |
commit | 2fde9901f6702ab82b5b2740fec9a7f9a80ddde4 (patch) | |
tree | 0ca92fabd4169095a50b43b8981d2a6c54f98531 /net/sctp/socket.c | |
parent | f89c2b464558a21fd3be8d578b7d13e810fb6b8a (diff) | |
parent | 3b6efee9231e12fce09c94930bfc59f66f18d662 (diff) |
Merge branch 'master'
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index abab81f3818..d890dfa8818 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4743,11 +4743,6 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags, struct sk_buff *skb; long timeo; - /* Caller is allowed not to check sk->sk_err before calling. */ - error = sock_error(sk); - if (error) - goto no_packet; - timeo = sock_rcvtimeo(sk, noblock); SCTP_DEBUG_PRINTK("Timeout: timeo: %ld, MAX: %ld.\n", @@ -4774,6 +4769,11 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags, if (skb) return skb; + /* Caller is allowed not to check sk->sk_err before calling. */ + error = sock_error(sk); + if (error) + goto no_packet; + if (sk->sk_shutdown & RCV_SHUTDOWN) break; |