From: Marcel Holtmann Date: Fri, 15 Aug 2014 19:43:37 +0000 (+0200) Subject: handle: Return POLLOUT | POLLWRNORM mask when no messages are pending X-Git-Tag: upstream/0.20140911.160207utc~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f39898bacf863002eb74dbab80fdf882e08698d;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git handle: Return POLLOUT | POLLWRNORM mask when no messages are pending To facility the feature of doing an asynchronous sending of messages when the bus is idle, make sure to return POLLOUT | POLLWRNORM from kdbus_handle_poll. Signed-off-by: Marcel Holtmann --- diff --git a/handle.c b/handle.c index ac68681..fc15d28 100644 --- a/handle.c +++ b/handle.c @@ -884,6 +884,8 @@ static unsigned int kdbus_handle_poll(struct file *file, mask |= POLLERR | POLLHUP; else if (!list_empty(&conn->msg_list)) mask |= POLLIN | POLLRDNORM; + else + mask |= POLLOUT | POLLWRNORM; mutex_unlock(&conn->lock); return mask;