manager: as soon as we know we're going to stop, clear DBus connection

So that the ObjectManager interface doesn't try to signal about e.g. interface
removals; see:

  https://bugzilla.gnome.org/show_bug.cgi?id=715157.
This commit is contained in:
Aleksander Morgado
2013-11-25 18:03:08 +01:00
parent 247a945950
commit f85e345a9e
2 changed files with 26 additions and 2 deletions

View File

@@ -44,6 +44,10 @@ static gboolean
quit_cb (gpointer user_data)
{
mm_info ("Caught signal, shutting down...");
if (manager)
g_object_set (manager, MM_MANAGER_CONNECTION, NULL, NULL);
if (loop)
g_idle_add ((GSourceFunc) g_main_loop_quit, loop);
else
@@ -100,6 +104,9 @@ name_lost_cb (GDBusConnection *connection,
else
mm_warn ("Could not acquire the '%s' service name", name);
if (manager)
g_object_set (manager, MM_MANAGER_CONNECTION, NULL, NULL);
g_main_loop_quit (loop);
}