Skip to content

DBus service specific connection lifetime management

For P2P connections (see also !24 (closed)) I would like to be able to ensure that the P2P connection is torn down and removed when the userspace streaming service stops without doing a clean shutdown.

The approach taken in this patchset is to:

  • Add a simple NMKeepAlive object to track the reason to keep a connection alive (connection visibility, dbus name or simply user activated), moving the logic around a bit.
  • Add a new AddAndActivateConnection2 routine, to allow passing arbitrary options
  • Add a new "persist" option ("disk", "memory", "volatile") and "bind" option ("none", "dbus-client") to implement the behaviour

With this, the client can pass {"persist": "volatile", "bind": "dbus-client"} to AddAndActivateConnection. If done, the connection will be disconnected and also the information destroyed when the dbus client who activated the connection disappears from the bus.

Merge request reports