From c6aa8160bb081997ebefb7f3bfc4a67760cce789 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 23 Jun 2015 00:47:39 +0200 Subject: [PATCH 1/1] make sure not to quit on own signal Bootings a system with kdbus the dbus-daemon is replaced with systemd-bus- proxy, which provides legacy dbus1 connectivity. However systemd-bus-proxy handles NameOwnerChange signal different, which makes xfsettingsd exit on its own signal. So check that equal name differs before exit. Signed-off-by: Christian Hesse --- xfsettingsd/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xfsettingsd/main.c b/xfsettingsd/main.c index 388a757..b6a0a2a 100644 --- a/xfsettingsd/main.c +++ b/xfsettingsd/main.c @@ -98,7 +98,10 @@ dbus_connection_filter_func (DBusConnection *connection, DBusMessage *message, void *user_data) { - gchar *name, *old, *new; + + const gchar *unique, *name, *old, *new; + + unique = dbus_bus_get_unique_name (connection); if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) { @@ -110,7 +113,8 @@ dbus_connection_filter_func (DBusConnection *connection, DBUS_TYPE_STRING, &new, DBUS_TYPE_INVALID)) { - if (g_strcmp0 (name, XFSETTINGS_DBUS_NAME) == 0) + if (g_strcmp0 (name, XFSETTINGS_DBUS_NAME) == 0 && + g_strcmp0 (unique, new) != 0) { g_printerr (G_LOG_DOMAIN ": %s\n", "Another instance took over. Leaving..."); gtk_main_quit (); -- 2.4.4