Remove unnecessary dbus_setenv()
authorChengwei Yang <chengwei.yang@intel.com>
Wed, 9 Oct 2013 01:39:43 +0000 (09:39 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 1 Nov 2013 12:08:33 +0000 (12:08 +0000)
DBUS_ACTIVATION_ADDRESS changed to DBUS_STARTER_ADDRESS and
DBUS_ACTIVATION_BUS_TYPE changed to DBUS_STARTER_BUS_TYPE since 2005 by
this commit - 8873c90

So the dbus_setenv() which used to unset the above two wrong environment
variables has no effect in fact. And giving that setenv(3) and putenv(3)
are not threadsafe, so it's better to remove them.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68308
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Acked-by: Colin Walters <walters@verbum.org>
dbus/dbus-bus.c

index 9d2095f..0fd4831 100644 (file)
@@ -294,12 +294,6 @@ init_connections_unlocked (void)
        * the above code will work right
        */
       
-      if (!dbus_setenv ("DBUS_ACTIVATION_ADDRESS", NULL))
-        return FALSE;
-
-      if (!dbus_setenv ("DBUS_ACTIVATION_BUS_TYPE", NULL))
-        return FALSE;
-      
       if (!_dbus_register_shutdown_func (addresses_shutdown_func,
                                          NULL))
         return FALSE;