From 4d55915b1727843b25e8b06a822125761041fc7b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 6 Jan 2013 17:52:20 +0200 Subject: [PATCH] core: Remove unused mgmt_disconnect function --- src/mgmt.c | 24 ------------------------ src/mgmt.h | 2 -- 2 files changed, 26 deletions(-) diff --git a/src/mgmt.c b/src/mgmt.c index 30bf4e335..872c886f7 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 c7829baa3..502cb821e 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, -- 2.47.3