aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-04-24 22:42:27 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-04-25 12:59:32 +0300
commit3733f3ebf347cc8e800ad3496e523b8aeab03676 (patch)
tree0572927418cea604af37cfa706817c23608a6dfe
parentd94f9cbf7575a73e46dc2d0c27958c2ec2d841a8 (diff)
downloadbluez-3733f3ebf347cc8e800ad3496e523b8aeab03676.tar.gz
bluez-3733f3ebf347cc8e800ad3496e523b8aeab03676.tar.xz
bluez-3733f3ebf347cc8e800ad3496e523b8aeab03676.zip
Add address type for BLE bt_io_connect calls
This patch adds the address type option in bt_io_connect calls for BLE devices. BR/EDR is the default value, and it is not mandatory to inform it. For BLE devices, it is necessary to inform if the type is public or random.
-rw-r--r--src/device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index ea6fec26..1ea48547 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2001,6 +2001,7 @@ static gboolean att_connect(gpointer user_data)
attcb, NULL, &gerr,
BT_IO_OPT_SOURCE_BDADDR, &sba,
BT_IO_OPT_DEST_BDADDR, &device->bdaddr,
+ BT_IO_OPT_DEST_TYPE, device->type,
BT_IO_OPT_CID, ATT_CID,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
BT_IO_OPT_INVALID);
@@ -2086,6 +2087,7 @@ int device_browse_primary(struct btd_device *device, DBusConnection *conn,
attcb, NULL, NULL,
BT_IO_OPT_SOURCE_BDADDR, &src,
BT_IO_OPT_DEST_BDADDR, &device->bdaddr,
+ BT_IO_OPT_DEST_TYPE, device->type,
BT_IO_OPT_CID, ATT_CID,
BT_IO_OPT_SEC_LEVEL, sec_level,
BT_IO_OPT_INVALID);
@@ -2488,7 +2490,8 @@ DBusMessage *device_create_bonding(struct btd_device *device,
device->att_io = bt_io_connect(BT_IO_L2CAP, att_connect_cb,
attcb, NULL, &gerr,
BT_IO_OPT_SOURCE_BDADDR, &sba,
- BT_IO_OPT_DEST_BDADDR,&device->bdaddr,
+ BT_IO_OPT_DEST_BDADDR, &device->bdaddr,
+ BT_IO_OPT_DEST_TYPE, device->type,
BT_IO_OPT_CID, ATT_CID,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
BT_IO_OPT_INVALID);