qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v5 04/14] net: port vde onto GSource


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v5 04/14] net: port vde onto GSource
Date: Fri, 26 Apr 2013 11:25:12 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Apr 26, 2013 at 10:47:25AM +0800, Liu Ping Fan wrote:
> +static gboolean vde_handler(gpointer data)
> +{
> +    EventGSource *nsrc = (EventGSource *)data;
> +
> +    if (nsrc->gfd.revents & G_IO_IN) {

The VDE file descriptor is a socket.  Please use the full G_IO_IN |
G_IO_HUP | G_IO_ERR set which is equivalent to select(2) rfds.  This
ensures we handle errors and disconnect.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]