Hi,

On 08/15/2014 09:43 PM, Marcel Holtmann wrote:
> 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 <mar...@holtmann.org>
> ---
>  handle.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/handle.c b/handle.c
> index ac6868133280..fc15d28351b3 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;

Hmm, what's your use case here? list_empty(&conn->msg_list) only checks
the incoming list of the current connection for pending messages. That
doesn't tell you whether the bus is idle, or if your receiving end has
messages pending ...

Anyway, I don't see a problem in that change, so I've applied it now.
Thanks!


Daniel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to