[libvirt] [PATCH 1/5] rpc: push ref acquisition into RPC dispatch function

John Ferlan jferlan at redhat.com
Wed Mar 7 23:26:10 UTC 2018



On 03/06/2018 12:58 PM, Daniel P. Berrangé wrote:
> There's no reason why the virNetServerClientDispatchRead method needs to
> acquire an extra reference on the "client" object. An extra reference is
> only needed if the registered dispatch callback is going to keep hold of
> the "client" for work in the background. Thus we can push reference
> acquisition into virNetServerDispatchNewMessage.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>  src/rpc/virnetserver.c       | 2 ++
>  src/rpc/virnetserverclient.c | 2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Makes sense... Chasing for the Unref shows virNetServerHandleJob which
of course had me wondering for the non dispatch path, when was that
Unref done in virNetServerClientDispatchRead...


Reviewed-by: John Ferlan <jferlan at redhat.com>

John




More information about the libvir-list mailing list