Diff between 1f6337025a1d53e11ff5429311e8dad7f3bbd3d3 and 4d55915b1727843b25e8b06a822125761041fc7b

Changed Files

File Additions Deletions Status
src/mgmt.c +0 -24 modified
src/mgmt.h +0 -2 modified

Full Patch

diff --git a/src/mgmt.c b/src/mgmt.c
index 30bf4e3..872c886 100644
--- a/src/mgmt.c
+++ b/src/mgmt.c
@@ -1124,30 +1124,6 @@ int mgmt_unblock_device(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type)
 	return 0;
 }
 
-int mgmt_disconnect(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type)
-{
-	char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_disconnect)];
-	struct mgmt_hdr *hdr = (void *) buf;
-	struct mgmt_cp_disconnect *cp = (void *) &buf[sizeof(*hdr)];
-	char addr[18];
-
-	ba2str(bdaddr, addr);
-	DBG("index %d %s", index, addr);
-
-	memset(buf, 0, sizeof(buf));
-	hdr->opcode = htobs(MGMT_OP_DISCONNECT);
-	hdr->len = htobs(sizeof(*cp));
-	hdr->index = htobs(index);
-
-	bacpy(&cp->addr.bdaddr, bdaddr);
-	cp->addr.type = bdaddr_type;
-
-	if (write(mgmt_sock, buf, sizeof(buf)) < 0)
-		error("write: %s (%d)", strerror(errno), errno);
-
-	return 0;
-}
-
 int mgmt_unpair_device(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type)
 {
 	char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_unpair_device)];
diff --git a/src/mgmt.h b/src/mgmt.h
index c7829ba..502cb82 100644
--- a/src/mgmt.h
+++ b/src/mgmt.h
@@ -28,8 +28,6 @@ void mgmt_cleanup(void);
 int mgmt_block_device(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type);
 int mgmt_unblock_device(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type);
 
-int mgmt_disconnect(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type);
-
 int mgmt_unpair_device(int index, const bdaddr_t *bdaddr, uint8_t bdaddr_type);
 
 int mgmt_set_did(int index, uint16_t vendor, uint16_t product,