From c867c84ae5f6bf6cd1ac06a2ece6e3fc427765c0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 14 Jul 2009 14:43:37 -0400 Subject: [PATCH] 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. --- src/nm-manager.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index 834bffe59..731589c40 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -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);