summaryrefslogtreecommitdiffstats
path: root/common/error.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-10 00:10:02 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-10 00:10:02 +0000
commit2b742d9f7a637b713bf77c52523dfee30922a080 (patch)
treec15a6e95520d192eff05f3b92e0cde141a7e5332 /common/error.c
parent55abd54fe949168a657d622762c604dccaa5cf83 (diff)
Fix some minor details
Diffstat (limited to 'common/error.c')
-rw-r--r--common/error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/error.c b/common/error.c
index adf2aa4f..bc813d74 100644
--- a/common/error.c
+++ b/common/error.c
@@ -50,8 +50,8 @@ DBusMessage *create_errno_message(DBusMessage *msg, int err)
DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err)
{
return error_common_reply(conn, msg,
- ERROR_INTERFACE ".ConnectionAttemptFailed",
- err ? strerror(err) : "Connection attempt failed");
+ ERROR_INTERFACE ".ConnectionAttemptFailed",
+ err > 0 ? strerror(err) : "Connection attempt failed");
}
/**
@@ -109,6 +109,7 @@ DBusHandlerResult error_common_reply(DBusConnection *conn, DBusMessage *msg,
const char *name, const char *descr)
{
DBusMessage *derr;
+ dbus_bool_t ret;
if (!conn || !msg)
return DBUS_HANDLER_RESULT_HANDLED;
@@ -117,7 +118,7 @@ DBusHandlerResult error_common_reply(DBusConnection *conn, DBusMessage *msg,
if (!derr)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- dbus_connection_send(conn, derr, NULL);
+ ret = dbus_connection_send(conn, derr, NULL);
dbus_message_unref(derr);