[libvirt] [PATCH v3 7/8] daemon: add connection close rpc

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Fri Feb 5 07:19:02 UTC 2016

On 04.02.2016 18:33, Daniel P. Berrange wrote:
> On Mon, Feb 01, 2016 at 03:40:20PM +0300, Nikolay Shirokovskiy wrote:
>> remoteConnectUnregisterCloseCallback is not quite good.
>> if it is given a callback function different from that
>> was registered before then local part will fail silently. On
>> the other hand we can not gracefully handle this fail
>> as the remote part is already unregistered.
> We could sanity check the callback before unregistering the
> remote part. Or you could do the local unregister first since
> if the remote part then fails, it is harmless - we'll see the
> close event frm the server still, but we won't dispatch it.

I'd prefer sanity check. The second option makes reregistering
impossible (however i doubt this is really a usecase). Will resend

>> There are a lot of options to fix it. I think of totally
>> removing the callback argument from unregistering. What's
>> the use of it?
> We can't remove it since that would change ABI.

Yes, I forgot about this.

More information about the libvir-list mailing list