summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2012-01-31 14:10:53 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-01-31 09:32:52 -0800
commit42d63192e58b81550b1ed78f802b0fed82eb0452 (patch)
treef44a435dd9174f41c4bbdf7728fc62686baedefb /plugins
parentd4891c5958e1166920d4af76d8e72b34a387a959 (diff)
downloadbluez-42d63192e58b81550b1ed78f802b0fed82eb0452.tar.gz
adapter_ops: Add address type information to the pair_device command
Now that we have address type information we have to inform it when pairing with an device.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hciops.c3
-rw-r--r--plugins/mgmtops.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c
index be8b412f5..90106df78 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -3649,7 +3649,8 @@ failed:
bonding_complete(dev, conn, HCI_UNSPECIFIED_ERROR);
}
-static int hciops_create_bonding(int index, bdaddr_t *bdaddr, uint8_t io_cap)
+static int hciops_create_bonding(int index, bdaddr_t *bdaddr,
+ uint8_t addr_type, uint8_t io_cap)
{
struct dev_info *dev = &devs[index];
BtIOSecLevel sec_level;
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 63af363b9..8f6788eaf 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -1952,7 +1952,7 @@ static int mgmt_set_io_capability(int index, uint8_t io_capability)
return 0;
}
-static int mgmt_create_bonding(int index, bdaddr_t *bdaddr, uint8_t io_cap)
+static int mgmt_create_bonding(int index, bdaddr_t *bdaddr, uint8_t addr_type, uint8_t io_cap)
{
char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_pair_device)];
struct mgmt_hdr *hdr = (void *) buf;
@@ -1968,6 +1968,7 @@ static int mgmt_create_bonding(int index, bdaddr_t *bdaddr, uint8_t io_cap)
hdr->index = htobs(index);
bacpy(&cp->addr.bdaddr, bdaddr);
+ cp->addr.type = addr_type;
cp->io_cap = io_cap;
if (write(mgmt_sock, &buf, sizeof(buf)) < 0)