diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-10-04 16:51:23 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-10-04 16:51:23 +0000 |
commit | 4b3a8ada4a341ebb9468a207fa892a71746da502 (patch) | |
tree | 379b61b4e4e29345766fad4f47ab1150e3c3f333 /hcid/dbus-adapter.c | |
parent | e3aaf5e9269661f1bda894af7e90e9ec284549db (diff) |
cleanup
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r-- | hcid/dbus-adapter.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index ac5b07b1..fbb913d3 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -882,11 +882,7 @@ static DBusHandlerResult handle_dev_set_minor_class_req(DBusConnection *conn, DB signal = dev_signal_factory(dbus_data->dev_id, "MinorClassChanged", DBUS_TYPE_STRING, &minor, DBUS_TYPE_INVALID); - if (signal) { - dbus_connection_send(conn, signal, NULL); - dbus_connection_flush(conn); - dbus_message_unref(signal); - } + send_reply_and_unref(conn, signal); reply = dbus_message_new_method_return(msg); @@ -1512,11 +1508,7 @@ static DBusHandlerResult handle_dev_set_remote_alias_req(DBusConnection *conn, D DBUS_TYPE_STRING, &addr, DBUS_TYPE_STRING, &alias, DBUS_TYPE_INVALID); - if (signal) { - dbus_connection_send(conn, signal, NULL); - dbus_connection_flush(conn); - dbus_message_unref(signal); - } + send_reply_and_unref(conn, signal); return send_reply_and_unref(conn, reply); } @@ -1564,11 +1556,7 @@ static DBusHandlerResult handle_dev_clear_remote_alias_req(DBusConnection *conn, signal = dev_signal_factory(dbus_data->dev_id, "RemoteAliasCleared", DBUS_TYPE_STRING, &addr_ptr, DBUS_TYPE_INVALID); - if (signal) { - dbus_connection_send(conn, signal, NULL); - dbus_connection_flush(conn); - dbus_message_unref(signal); - } + send_reply_and_unref(conn, signal); } return send_reply_and_unref(conn, reply); @@ -2065,11 +2053,7 @@ static DBusHandlerResult handle_dev_remove_bonding_req(DBusConnection *conn, DBu signal = dev_signal_factory(dbus_data->dev_id, "BondingRemoved", DBUS_TYPE_STRING, &addr_ptr, DBUS_TYPE_INVALID); - if (signal) { - dbus_connection_send(conn, signal, NULL); - dbus_connection_flush(conn); - dbus_message_unref(signal); - } + send_reply_and_unref(conn, signal); reply = dbus_message_new_method_return(msg); |