summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-02-22 21:39:50 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-02-22 21:39:50 +0000
commit44309cd562eeefef51674711b50ae8c0f10e88a2 (patch)
tree9e880e5e589f29484fe3c67ca266a63209bf61a3 /hcid/dbus-device.c
parent0dfe8a30bc6fe92d3fa5fba14645099659e9142a (diff)
Send bonding removed signal
Diffstat (limited to 'hcid/dbus-device.c')
-rw-r--r--hcid/dbus-device.c13
1 files changed, 13 insertions, 0 deletions
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: