libnm/vpn-service-plugin: add watch-peer property

System Internals / NetworkManager - Lubomir Rintel [v3.sk] - 13 October 2015 11:20 UTC

Make it possible to construct the plugin instance in a way that disconnects the connection if the DBus client that activated it drops off the bus. This makes the plugins conveniently clean up when NetworkManager crashes.

We need this, as with multiple VPN support we can loose track of the client bus names when the daemon crashes leaving to nice way to clean up on respawn.

However, this behavior is not desired for debugging or hypotetical VPN plugin users other than NetworkManager (say; "gdbus call -m o.fd.NM.VPN.Plugin.Connect"). Let the plugin decide when to use it.

9f15abb libnm/vpn-service-plugin: add watch-peer property
libnm/nm-vpn-service-plugin.c | 65 +++++++++++++++++++++++++++++++++++++++++
libnm/nm-vpn-service-plugin.h | 1 +
2 files changed, 66 insertions(+)

Upstream: cgit.freedesktop.org


  • Share