From 44309cd562eeefef51674711b50ae8c0f10e88a2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 22 Feb 2006 21:39:50 +0000 Subject: Send bonding removed signal --- hcid/dbus-device.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hcid/dbus-device.c b/hcid/dbus-device.c index b4dc5d68..811d06b2 100644 --- a/hcid/dbus-device.c +++ b/hcid/dbus-device.c @@ -795,8 +795,10 @@ static DBusMessage* handle_dev_has_bonding_req(DBusMessage *msg, void *data) static DBusMessage* handle_dev_remove_bonding_req(DBusMessage *msg, void *data) { struct hci_dbus_data *dbus_data = data; + DBusConnection *connection = get_dbus_connection(); DBusMessageIter iter; DBusMessage *reply; + DBusMessage *signal; char filename[PATH_MAX + 1]; char addr[18], *addr_ptr; struct hci_conn_info_req *cr; @@ -845,6 +847,17 @@ static DBusMessage* handle_dev_remove_bonding_req(DBusMessage *msg, void *data) goto failed; } + /* FIXME: which condition must be verified before send the signal */ + signal = dev_signal_factory(dbus_data->dev_id, + DEV_SIG_BONDING_REMOVED, + DBUS_TYPE_STRING, &addr_ptr, + DBUS_TYPE_INVALID); + if (signal) { + dbus_connection_send(connection, signal, NULL); + dbus_connection_flush(connection); + dbus_message_unref(signal); + } + reply = dbus_message_new_method_return(msg); failed: -- cgit