diff --git a/plugins/hciops.c b/plugins/hciops.c
index c51ddcf..1048bf6 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
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);
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index a2df3f7..c0af8d8 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
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);
diff --git a/src/adapter.c b/src/adapter.c
index e7c71b0..099b1c2 100644
--- a/src/adapter.c
+++ b/src/adapter.c
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,
diff --git a/src/adapter.h b/src/adapter.h
index f83e412..f99eb19 100644
--- a/src/adapter.h
+++ b/src/adapter.h
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);
diff --git a/src/device.c b/src/device.c
index c91e321..3803813 100644
--- a/src/device.c
+++ b/src/device.c
device->disconn_timer = 0;
- btd_adapter_disconnect_device(device->adapter, &device->bdaddr);
+ btd_adapter_disconnect_device(device->adapter, &device->bdaddr,
+ device->type);
return FALSE;
}