X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bus%2Factivation-helper.c;h=e3b3323c49d9c0f8626d5cd4b63c8cfbbd3af4b5;hb=61d97215c317a4154df47fbfb882aab60b92fbab;hp=ab9d6010ee6da0f585a5c1ae26973dc2c9bf8e96;hpb=ef8d0d75d538db543ab0ff68809656f3972e3848;p=platform%2Fupstream%2Fdbus.git diff --git a/bus/activation-helper.c b/bus/activation-helper.c index ab9d601..e3b3323 100644 --- a/bus/activation-helper.c +++ b/bus/activation-helper.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -140,21 +141,12 @@ out_all: return desktop_file; } -/* Cleares the environment, except for DBUS_VERBOSE and DBUS_STARTER_x */ +/* Clears the environment, except for DBUS_STARTER_x, + * which we hardcode to the system bus. + */ static dbus_bool_t clear_environment (DBusError *error) { - const char *starter_env = NULL; -#ifdef DBUS_ENABLE_VERBOSE_MODE - const char *debug_env = NULL; - - /* are we debugging */ - debug_env = _dbus_getenv ("DBUS_VERBOSE"); -#endif - - /* we save the starter */ - starter_env = _dbus_getenv ("DBUS_STARTER_ADDRESS"); - #ifndef ACTIVATION_LAUNCHER_TEST /* totally clear the environment */ if (!_dbus_clearenv ()) @@ -163,21 +155,12 @@ clear_environment (DBusError *error) "could not clear environment\n"); return FALSE; } -#endif -#ifdef DBUS_ENABLE_VERBOSE_MODE - /* restore the debugging environment setting if set */ - if (debug_env) - _dbus_setenv ("DBUS_VERBOSE", debug_env); + /* Ensure the bus is set to system */ + dbus_setenv ("DBUS_STARTER_ADDRESS", DBUS_SYSTEM_BUS_DEFAULT_ADDRESS); + dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system"); #endif - /* restore the starter */ - if (starter_env) - _dbus_setenv ("DBUS_STARTER_ADDRESS", starter_env); - - /* set the type, which must be system if we got this far */ - _dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system"); - return TRUE; }