diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 10:01:33 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 10:01:33 +0000 |
commit | 52f1452d5dedfade299fa81b68fa759b13aa86d9 (patch) | |
tree | ec51d4992eab3fced5c6f1ead43b6efd128a11bf /hcid/dbus-error.c | |
parent | e64373ef34f318aa60030cde093aa7cd7694c714 (diff) |
Fix the D-Bus sending for error messages
Diffstat (limited to 'hcid/dbus-error.c')
-rw-r--r-- | hcid/dbus-error.c | 11 |
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, |