[gnome-session/wip/benzea/systemd-user-switch: 3/4] manager: Drop DBus restart as it is handled using systemd
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/wip/benzea/systemd-user-switch: 3/4] manager: Drop DBus restart as it is handled using systemd
- Date: Wed, 24 Apr 2019 07:14:17 +0000 (UTC)
commit 2c10e324b4e998b61a221fa9574a822457110c11
Author: Benjamin Berg <bberg redhat com>
Date: Wed Apr 17 11:11:53 2019 +0200
manager: Drop DBus restart as it is handled using systemd
The stop target now unconditionally restarts DBus. This effectively
removes the check that the user has no other session, but we do not
currently support multiple graphical sessions anyway.
gnome-session/gsm-manager.c | 38 --------------------------------------
1 file changed, 38 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index d2e6d902..0b79e01d 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -955,40 +955,6 @@ _client_stop (const char *id,
return FALSE;
}
-#ifdef HAVE_SYSTEMD
-static void
-maybe_restart_user_bus (GsmManager *manager)
-{
- GsmSystem *system;
- g_autoptr(GVariant) reply = NULL;
- g_autoptr(GError) error = NULL;
-
- if (manager->priv->dbus_disconnected)
- return;
-
- system = gsm_get_system ();
-
- if (!gsm_system_is_last_session_for_user (system))
- return;
-
- reply = g_dbus_connection_call_sync (manager->priv->connection,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "TryRestartUnit",
- g_variant_new ("(ss)", "dbus.service", "replace"),
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
-
- if (error != NULL) {
- g_debug ("GsmManager: reloading user bus failed: %s", error->message);
- }
-}
-#endif
-
static void
do_phase_exit (GsmManager *manager)
{
@@ -998,10 +964,6 @@ do_phase_exit (GsmManager *manager)
NULL);
}
-#ifdef HAVE_SYSTEMD
- maybe_restart_user_bus (manager);
-#endif
-
end_phase (manager);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]