Re: [PATCH 03/10] daemon: Subscribe the stream event callback for error events.

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

 



On Wed, Oct 12, 2011 at 03:43:13PM +0200, Peter Krempa wrote:
> This patch subscribes the daemon-side event callback for error and
> hangup events. The functionality to handle them is already implemented
> in the callback.
> ---
>  daemon/stream.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/daemon/stream.c b/daemon/stream.c
> index 7df9952..5ec899c 100644
> --- a/daemon/stream.c
> +++ b/daemon/stream.c
> @@ -77,7 +77,7 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
>  static void
>  daemonStreamUpdateEvents(daemonClientStream *stream)
>  {
> -    int newEvents = 0;
> +    int newEvents = VIR_STREAM_EVENT_HANGUP | VIR_STREAM_EVENT_ERROR;
>      if (stream->rx)
>          newEvents |= VIR_STREAM_EVENT_WRITABLE;
>      if (stream->tx && !stream->recvEOF)

This shouldn't be required. With the event loop HANGUP/ERROR are always
implied, whenever you request WRITABLE/READABLE.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]