[libvirt] [PATCH] event: clean up client side RPC code

Eric Blake eblake at redhat.com
Wed Jan 8 19:34:37 UTC 2014


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 at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140108/ec570bb5/attachment-0001.sig>


More information about the libvir-list mailing list