From 634a879abdbe2d6010ebda2e4accce9179fc8c74 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 9 Jun 2006 15:29:43 +0000 Subject: Remove BondingFailed signal for now --- hcid/dbus-api.txt | 4 ---- hcid/dbus.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hcid/dbus-api.txt b/hcid/dbus-api.txt index 97f33d0f..7e2dddd2 100644 --- a/hcid/dbus-api.txt +++ b/hcid/dbus-api.txt @@ -766,10 +766,6 @@ Signals void ModeChanged(string mode) Signals that a bonding was removed. - void BondingFailed(string address) - - Signals that bonding creation failed. - Security hierarchy ================== diff --git a/hcid/dbus.c b/hcid/dbus.c index 71386f93..53bf7b24 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -619,6 +619,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u * 0x00: authentication request successfully completed * 0x01-0x0F: authentication request failed */ +#if 0 name = status ? "BondingFailed" : "BondingCreated"; /* authentication signal */ message = dev_signal_factory(pdata->dev_id, name, @@ -626,6 +627,14 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u DBUS_TYPE_INVALID); send_reply_and_unref(connection, message); +#endif + if (!status) { + name = "BondingCreated"; + message = dev_signal_factory(pdata->dev_id, name, + DBUS_TYPE_STRING, &peer_addr, + DBUS_TYPE_INVALID); + send_reply_and_unref(connection, message); + } if (!pdata->bonding || bacmp(&pdata->bonding->bdaddr, peer)) goto failed; /* skip: no bonding req pending */ @@ -1242,12 +1251,13 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle /* Check if there is a pending Bonding */ if (pdata->bonding && (bacmp(&pdata->bonding->bdaddr, &dev->bdaddr) == 0)) { - +#if 0 message = dev_signal_factory(pdata->dev_id, "BondingFailed", DBUS_TYPE_STRING, &peer_addr, DBUS_TYPE_INVALID); send_reply_and_unref(connection, message); +#endif message = dbus_msg_new_authentication_return(pdata->bonding->rq, status); send_reply_and_unref(connection, message); -- cgit