On 01/08/2014 10:51 AM, Michal Privoznik wrote:
On 08.01.2014 18:23, Eric Blake wrote:
> Commit cfd62c1 was incomplete; I found more cases where error
> messages were being overwritten, and where the code between
> the three registration/deregistration APIs was not consistent.
>
> Since it is fairly easy to trigger an attempt to register an
> unregistered object, I also changed the error message from
> VIR_ERR_INTERNAL_ERROR to VIR_ERR_INVALID_ARG.
>
> * src/conf/object_event.c (virObjectEventCallbackListEventID):
> Inline...
> (virObjectEventStateEventID): ...into lone caller, and report
> error on failure.
> (virObjectEventCallbackListAddID, virObjectEventStateCallbackID)
> (virObjectEventCallbackListRemoveID)
> (virObjectEventCallbackListMarkDeleteID): Tweak error category.
> * src/remote/remote_driver.c (remoteConnectDomainEventRegister):
> Don't leak registration on failure.
> (remoteConnectDomainEventDeregisterAny)
> (remoteConnectNetworkEventDeregisterAny): Don't overwrite error.
>
> Signed-off-by: Eric Blake <eblake(a)redhat.com>
> ---
> src/conf/object_event.c | 57 ++++++++++++++++++++++------------------------
> src/remote/remote_driver.c | 56 ++++++++++++++++++++++-----------------------
> 2 files changed, 55 insertions(+), 58 deletions(-)
ACK
Thanks; pushed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org