[libvirt] [PATCH] fix EventImpl-related error paths in remote driver

This patch makes the remote driver behave properly in the face of: (a) no registered EventImpl, or (b) an EventImpl that returns failure from AddHandle/Timeout In both cases, we now cleanup properly (rather than always passing bogus values to virEventRemoveHandle/Timeout) and fail attempts to register for domain events (w/VIR_ERR_NO_SUPPORT rather than blissfully continue when we can't possibly deliver events). Dave remote_internal.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)

On Thu, Nov 20, 2008 at 04:55:44PM -0500, David Lively wrote:
This patch makes the remote driver behave properly in the face of: (a) no registered EventImpl, or (b) an EventImpl that returns failure from AddHandle/Timeout
In both cases, we now cleanup properly (rather than always passing bogus values to virEventRemoveHandle/Timeout) and fail attempts to register for domain events??? (w/VIR_ERR_NO_SUPPORT rather than blissfully continue when we can't possibly deliver events).
All makes sense - you also fixed a RemoveHandle call to take priv->watch instead of priv->sock which I had missed in my changes. I've committed this patch Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
David Lively