return 0;
}
-static int hciops_disconnect(int index, bdaddr_t *bdaddr)
+static int hciops_disconnect(int index, bdaddr_t *bdaddr, addr_type_t type)
{
DBG("hci%d", index);
return 0;
}
-static int mgmt_disconnect(int index, bdaddr_t *bdaddr)
+static int mgmt_disconnect(int index, bdaddr_t *bdaddr, addr_type_t type)
{
char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_disconnect)];
struct mgmt_hdr *hdr = (void *) buf;
hdr->index = htobs(index);
bacpy(&cp->addr.bdaddr, bdaddr);
+ cp->addr.type = mgmt_addr_type(type);
if (write(mgmt_sock, buf, sizeof(buf)) < 0)
error("write: %s (%d)", strerror(errno), errno);
timeout, clock, accuracy);
}
-int btd_adapter_disconnect_device(struct btd_adapter *adapter, bdaddr_t *bdaddr)
+int btd_adapter_disconnect_device(struct btd_adapter *adapter,
+ bdaddr_t *bdaddr, addr_type_t type)
+
{
- return adapter_ops->disconnect(adapter->dev_id, bdaddr);
+ return adapter_ops->disconnect(adapter->dev_id, bdaddr, type);
}
int btd_adapter_remove_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr,
int (*block_device) (int index, bdaddr_t *bdaddr);
int (*unblock_device) (int index, bdaddr_t *bdaddr);
int (*get_conn_list) (int index, GSList **conns);
- int (*disconnect) (int index, bdaddr_t *bdaddr);
+ int (*disconnect) (int index, bdaddr_t *bdaddr, addr_type_t type);
int (*remove_bonding) (int index, bdaddr_t *bdaddr, addr_type_t type);
int (*pincode_reply) (int index, bdaddr_t *bdaddr, const char *pin,
size_t pin_len);
int btd_adapter_unblock_address(struct btd_adapter *adapter, bdaddr_t *bdaddr);
int btd_adapter_disconnect_device(struct btd_adapter *adapter,
- bdaddr_t *bdaddr);
+ bdaddr_t *bdaddr, addr_type_t type);
int btd_adapter_remove_bonding(struct btd_adapter *adapter, bdaddr_t *bdaddr,
addr_type_t type);
device->disconn_timer = 0;
- btd_adapter_disconnect_device(device->adapter, &device->bdaddr);
+ btd_adapter_disconnect_device(device->adapter, &device->bdaddr,
+ device->type);
return FALSE;
}