GApplication: unregister bus name
authorMatthias Clasen <mclasen@redhat.com>
Fri, 18 Nov 2011 04:30:32 +0000 (23:30 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 19 Nov 2011 21:24:08 +0000 (16:24 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=647987

gio/gapplicationimpl-dbus.c

index 9eeb344..3fae844 100644 (file)
@@ -408,6 +408,17 @@ g_application_impl_destroy (GApplicationImpl *impl)
         g_dbus_connection_unregister_object (impl->session_bus,
                                              impl->object_id);
 
+      g_dbus_connection_call (impl->session_bus,
+                              "org.freedesktop.DBus",
+                              "/org/freedesktop/DBus",
+                              "org.freedesktop.DBus",
+                              "ReleaseName",
+                              g_variant_new ("(s)",
+                                             impl->bus_name),
+                              NULL,
+                              G_DBUS_CALL_FLAGS_NONE,
+                              -1, NULL, NULL, NULL);
+
       g_object_unref (impl->session_bus);
       g_free (impl->object_path);
     }