GTestDBus: Make sure only DBUS_SESSION_BUS_ADDRESS is set by default

g_test_dbus_unset() now also unset DBUS_STARTER_ADDRESS and
DBUS_STARTER_BUS_TYPE.

https://bugzilla.gnome.org/show_bug.cgi?id=697348
This commit is contained in:
Xavier Claessens 2013-10-28 14:54:22 -04:00
parent 940fa98290
commit 06fbdb04d5

View File

@ -758,6 +758,7 @@ g_test_dbus_up (GTestDBus *self)
start_daemon (self);
g_test_dbus_unset ();
g_setenv ("DBUS_SESSION_BUS_ADDRESS", self->priv->bus_address, TRUE);
self->priv->up = TRUE;
}
@ -811,7 +812,7 @@ g_test_dbus_down (GTestDBus *self)
if (connection != NULL)
_g_object_unref_and_wait_weak_notify (connection);
g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
g_test_dbus_unset ();
self->priv->up = FALSE;
}
@ -830,4 +831,6 @@ g_test_dbus_unset (void)
{
g_unsetenv ("DISPLAY");
g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
g_unsetenv ("DBUS_STARTER_ADDRESS");
g_unsetenv ("DBUS_STARTER_BUS_TYPE");
}