
On Tue, Jan 28, 2014 at 02:08:26PM +0100, Christophe Fergeau wrote:
It's possible to create a handle to watch for file events which do not watch for any file event. Such a handle can be enabled later with gvir_event_handle_update() by setting some conditions to watch for.
When a handle is disabled after it has been created, gvir_event_handle_update() makes sure it removes the corresponding gvir_event_handle::source IO watch if any was set. gvir_event_handle_add() will always create a gvir_event_handle::source IO watch even if the handle is not watching for any events.
This commit makes consistent by only creating a watch with g_io_add_watch() when the caller asked to watch for some events. --- libvirt-glib/libvirt-glib-event.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
ACK 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 :|