From ddce48ede036f3996f8e584b0012c396c5df42fb Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Tue, 6 Nov 2007 09:40:14 +0000 Subject: Config: D-Bus: Fix dbus_bus_request_name failure check The code in connect_hook incorrectly checks for dbus_bus_request_name failure. The dbus_bus_request_name error indicator is -1, not 0. This leads to subsequent assertion failure in libdbus. --- config/dbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/dbus.c b/config/dbus.c index c8675120f..6fe061815 100644 --- a/config/dbus.c +++ b/config/dbus.c @@ -355,8 +355,8 @@ connect_hook(DBusConnection *connection, void *data) dbus_error_init(&error); - if (!dbus_bus_request_name(info->connection, info->busname, - 0, &error)) { + dbus_bus_request_name(info->connection, info->busname, 0, &error); + if (dbus_error_is_set(&error)) { ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n", error.name, error.message); goto err_start; -- cgit v1.2.3