diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 22:03:49 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 22:03:49 (GMT) |
commit | 33ddcbbfb1d9f1bf1259531ae0ba8400ea3c8ba1 (patch) | |
tree | c56e090e4984c84d1cee247e48856f8d82ab813e | |
parent | 4d45cbacb8488ae3172065e4fca608079492231b (diff) | |
parent | 9eb5c94ef217d61d974f384b29b7298490b0a4d9 (diff) | |
download | linux-fsl-qoriq-33ddcbbfb1d9f1bf1259531ae0ba8400ea3c8ba1.tar.xz |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r-- | net/decnet/af_decnet.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 3f25cad..f89e55f 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -1664,17 +1664,15 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, goto out; } - rv = dn_check_state(sk, NULL, 0, &timeo, flags); - if (rv) - goto out; - if (sk->sk_shutdown & RCV_SHUTDOWN) { - if (!(flags & MSG_NOSIGNAL)) - send_sig(SIGPIPE, current, 0); - rv = -EPIPE; + rv = 0; goto out; } + rv = dn_check_state(sk, NULL, 0, &timeo, flags); + if (rv) + goto out; + if (flags & ~(MSG_PEEK|MSG_OOB|MSG_WAITALL|MSG_DONTWAIT|MSG_NOSIGNAL)) { rv = -EOPNOTSUPP; goto out; @@ -1928,6 +1926,8 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, if (sk->sk_shutdown & SEND_SHUTDOWN) { err = -EPIPE; + if (!(flags & MSG_NOSIGNAL)) + send_sig(SIGPIPE, current, 0); goto out_err; } |