summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-error.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-06 10:01:33 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-06 10:01:33 +0000
commit52f1452d5dedfade299fa81b68fa759b13aa86d9 (patch)
treeec51d4992eab3fced5c6f1ead43b6efd128a11bf /hcid/dbus-error.c
parente64373ef34f318aa60030cde093aa7cd7694c714 (diff)
Fix the D-Bus sending for error messages
Diffstat (limited to 'hcid/dbus-error.c')
-rw-r--r--hcid/dbus-error.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index 98e06e9a..c1d1506a 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -39,6 +39,17 @@
#include "dbus-error.h"
#include "error.h"
+static inline DBusHandlerResult send_message_and_unref(DBusConnection *conn,
+ DBusMessage *msg)
+{
+ if (msg) {
+ dbus_connection_send(conn, msg, NULL);
+ dbus_message_unref(msg);
+ }
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+}
+
DBusHandlerResult error_rejected(DBusConnection *conn, DBusMessage *msg)
{
return send_message_and_unref(conn,