diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 04:14:25 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 04:14:25 -0500 |
commit | 6cf5bcaaf9a92225017f7a3f1a630f6b5147ad4a (patch) | |
tree | bf5fead8ac5333346b17d34a1d2f8f9d5dc608be /net/sctp/socket.c | |
parent | 6fc88198961141c2d9d34cde0855fb2e85ea3382 (diff) | |
parent | 436b0f76f2cee6617f27a649637766628909dd5d (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; |