diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-04-19 12:00:24 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-04-19 18:12:22 +0930 |
commit | e1f0b3e70b696d7ea4cf9e6ed30d751e7fdbc577 (patch) | |
tree | 0073a61c7ce492c6c49715196f0914bce54bb158 /config/config.c | |
parent | c6972c893359f8fa7631ae674330f3f4f7010ba0 (diff) |
config: Return errors as negative numbers, device ids as positive numbers.
Update dbus-api documentation.
Diffstat (limited to 'config/config.c')
-rw-r--r-- | config/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/config.c b/config/config.c index 4861d9ead..9b38faf49 100644 --- a/config/config.c +++ b/config/config.c @@ -308,12 +308,15 @@ configMessage(DBusConnection *connection, DBusMessage *message, void *closure) if (ret != BadDrawable && ret != BadAlloc) { if (!strlen(dbus_message_get_signature(reply))) + { + ret = -ret; /* return errors as negative numbers */ if (!dbus_message_iter_append_basic(&r_iter, DBUS_TYPE_INT32, &ret)) { ErrorF("[config] couldn't append to iterator\n"); dbus_message_unref(reply); dbus_error_free(&error); return DBUS_HANDLER_RESULT_HANDLED; } + } if (!dbus_connection_send(bus, reply, NULL)) ErrorF("[config] failed to send reply\n"); |