summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-06-09 15:29:43 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-06-09 15:29:43 +0000
commit634a879abdbe2d6010ebda2e4accce9179fc8c74 (patch)
tree443151bd44df5af96ecb5098752271567caa3f47
parent1fc231fa69426c8f6065257cf944db976777d6c1 (diff)
Remove BondingFailed signal for now
-rw-r--r--hcid/dbus-api.txt4
-rw-r--r--hcid/dbus.c12
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);