diff options
author | Elvis Pranskevichus <el@prans.net> | 2007-11-06 09:40:14 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-11-06 09:40:36 +0000 |
commit | ddce48ede036f3996f8e584b0012c396c5df42fb (patch) | |
tree | 1dbc51044f7dbe898480dfa5ca84d0088a0f4048 /config/dbus.c | |
parent | 58332894c061ae96d6a457f65266660f5f65e88b (diff) |
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.
Diffstat (limited to 'config/dbus.c')
-rw-r--r-- | config/dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |