[libvirt] [PATCH] event: don't overwrite registration error message
Martin Kletzander
mkletzan at redhat.com
Thu Jan 2 10:20:41 UTC 2014
On Tue, Dec 31, 2013 at 07:22:53AM -0700, Eric Blake wrote:
> Prior to this patch, an attempt to register an event without an
> event loop started results in the vague:
>
> libvirt: Remote Driver error : adding cb to list
>
> Now it gives the much nicer:
>
> libvirt: error : internal error: could not initialize domain event timer
>
> This also avoids hiding other reasonable error messages, such as
> attempts to register a duplicate callback or OOM errors.
>
> Also, document the event loop usage requirement, since that was how
> I ran into the issue.
>
> * src/remote/remote_driver.c (remoteConnectNetworkEventRegisterAny)
> (remoteConnectDomainEventRegister)
> (remoteConnectDomainEventRegisterAny): Preserve more detailed error.
> * src/libvirt.c (virConnectDomainEventRegister)
> (virConnectDomainEventRegisterAny)
> (virConnectNetworkEventRegisterAny): Document event loop requirement.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> src/libvirt.c | 24 +++++++++++++++---------
> src/remote/remote_driver.c | 12 +++---------
> 2 files changed, 18 insertions(+), 18 deletions(-)
>
ACK, although I wasn't (somehow) able to test it with python bindings.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140102/1e4acc36/attachment-0001.sig>
More information about the libvir-list
mailing list