mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 16:00:07 +01:00
core: fix connection updated/removed signal handling
The DBusGProxy was getting destroyed after all the ListConnections calls were completed, and thus the dbus match was removed, and the signals weren't getting reflected back up into NM to be handled. Fix that by attaching the DBusGProxy to the NMConnection it represents to ensure it lives until that NMConnection dies.
This commit is contained in:
parent
ee49af01d3
commit
c867c84ae5
1 changed files with 10 additions and 0 deletions
|
|
@ -630,6 +630,16 @@ user_connection_get_settings_cb (DBusGProxy *proxy,
|
|||
g_strdup (path),
|
||||
connection);
|
||||
existing = NULL;
|
||||
|
||||
/* Attach the D-Bus proxy representing the remote NMConnection
|
||||
* to the local NMConnection object to ensure it stays alive to
|
||||
* continue delivering signals. It'll be destroyed once the
|
||||
* NMConnection is destroyed.
|
||||
*/
|
||||
g_object_set_data_full (G_OBJECT (connection),
|
||||
"proxy",
|
||||
info->proxy,
|
||||
g_object_ref (info->proxy));
|
||||
} else
|
||||
g_object_unref (connection);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue