Currently close callback API can only inform us of closing the connection between remote driver and daemon. But what if a driver running in the daemon itself can have another persistent connection? In this case we want to be informed of that connection changes state too. This patch series extends meaning of current close callback API so that now it notifies of closing of any internal persistent connection. The overall approach is to move close callback support to drivers. Changes from v3: ================ Add patch [3] "close callback: make unregister clean after connect close event." Make register/unregister methods of connection close callback object return void. This solves the problem of patch [8] "daemon: add connection close rpc" ([7] in previous version) of consistent unregistering. All checks are moved outside of the methods. I hesitate whether to add or not means that track connection close callback object consinstency and finally decided to add (checks and warnings inside methods). The reason is that without these checks we get memory leaks which are rather difficult to find out. Unfortunately this change touch a number of patches as the first change is done in the first patch of the series. Changes from v2: ================ Split patches further to make it more comprehensible. Nikolay Shirokovskiy (9): factor out virConnectCloseCallbackDataPtr methods virConnectCloseCallbackData: fix connection object refcount close callback: make unregister clean after connect close event virConnectCloseCallbackData: factor out callback disarming close callback API: remove unnecessary locks virConnectCloseCallbackDataDispose: remove unnecessary locks close callback: move it to driver daemon: add connection close rpc vz: implement connection close notification daemon/libvirtd.h | 1 + daemon/remote.c | 84 ++++++++++++++++++++++++++++++ src/datatypes.c | 118 ++++++++++++++++++++++++++++++++++--------- src/datatypes.h | 16 ++++-- src/driver-hypervisor.h | 12 +++++ src/libvirt-host.c | 46 ++--------------- src/remote/remote_driver.c | 114 ++++++++++++++++++++++++++++++++++------- src/remote/remote_protocol.x | 24 ++++++++- src/remote_protocol-structs | 6 +++ src/vz/vz_driver.c | 59 ++++++++++++++++++++++ src/vz/vz_sdk.c | 4 ++ src/vz/vz_utils.h | 3 ++ 12 files changed, 397 insertions(+), 90 deletions(-) -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list