]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/af_bluetooth.c
[PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications
[linux-2.6-omap-h63xx.git] / net / bluetooth / af_bluetooth.c
index fb031fe9be9ed140bce6fdfe6092f3ab6df8ff87..469eda0f0dfd713f0d998b5c830faaff2e9c71fd 100644 (file)
@@ -238,6 +238,9 @@ unsigned int bt_sock_poll(struct file * file, struct socket *sock, poll_table *w
        if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
                mask |= POLLERR;
 
+       if (sk->sk_shutdown & RCV_SHUTDOWN)
+               mask |= POLLRDHUP;
+
        if (sk->sk_shutdown == SHUTDOWN_MASK)
                mask |= POLLHUP;