]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Set default exit_on_disconnect after registration
authorColin Walters <walters@space-ghost.verbum.private>
Wed, 26 Mar 2008 14:28:40 +0000 (10:28 -0400)
committerColin Walters <walters@space-ghost.verbum.private>
Wed, 26 Mar 2008 14:28:40 +0000 (10:28 -0400)
2008-03-26  Colin Walters  <walters@verbum.org>
Patch from Scott James Remnant <scott@netsplit.com>

* dbus/dbus-bus.c: Set default exit_on_disconnect after registration with
the bus, not before.  This ensures that programs which wish to set
exit_on_disconnect to FALSE will not be terminated if the bus exits
during registration.  (FDO Bug #15112)

ChangeLog
dbus/dbus-bus.c

index 96cecd01f76f651d34b4501ace27f3c050ccba4c..5503219a65510c8c179f29e9e3ec8b16ca33e315 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-03-26  Colin Walters  <walters@verbum.org>
+
+       Patch from Scott James Remnant <scott@netsplit.com>
+
+       * dbus/dbus-bus.c: Set default exit_on_disconnect after registration with
+       the bus, not before.  This ensures that programs which wish to set
+       exit_on_disconnect to FALSE will not be terminated if the bus exits
+       during registration.  (FDO Bug #15112)
+
 2008-03-04  John (J5) Palmieri  <johnp@redhat.com>
 
        * fix broken poll on Mac OSX - build patch by Benjamin Reed
index c7f43e8ca4463c8518b7e1f85e17eae1b5bf4dd3..e159dae74290aae5866444a4aa9d462a7e75ff04 100644 (file)
@@ -436,12 +436,6 @@ internal_bus_get (DBusBusType  type,
       return NULL;
     }
 
-  /* By default we're bound to the lifecycle of
-   * the message bus.
-   */
-  dbus_connection_set_exit_on_disconnect (connection,
-                                          TRUE);
-  
   if (!dbus_bus_register (connection, error))
     {
       _DBUS_ASSERT_ERROR_IS_SET (error);
@@ -461,6 +455,12 @@ internal_bus_get (DBusBusType  type,
       bus_connections[type] = connection;
     }
 
+  /* By default we're bound to the lifecycle of
+   * the message bus.
+   */
+  dbus_connection_set_exit_on_disconnect (connection,
+                                          TRUE);
   _DBUS_LOCK (bus_datas);
   bd = ensure_bus_data (connection);
   _dbus_assert (bd != NULL); /* it should have been created on