• E
    event: clean up client side RPC code · 6d8233fe
    Eric Blake 提交于
    Commit cfd62c1f 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 deregister an
    unregistered object through public API, 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: NEric Blake <eblake@redhat.com>
    6d8233fe
object_event.c 25.2 KB