Diff between 3b986a89e1eac2621292c8ff13b332b1cee399b3 and 2b7846c80a56c20822c6ffb21cb2ba1d5c004783

Changed Files

File Additions Deletions Status
src/mgmt.c +0 -21 modified
src/mgmt.h +0 -1 modified

Full Patch

diff --git a/src/mgmt.c b/src/mgmt.c
index 1b6f02e..449d947 100644
--- a/src/mgmt.c
+++ b/src/mgmt.c
@@ -1075,27 +1075,6 @@ int mgmt_set_powered(int index, gboolean powered)
 	return mgmt_set_mode(index, MGMT_OP_SET_POWERED, powered);
 }
 
-int mgmt_set_name(int index, const char *name)
-{
-	char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_set_local_name)];
-	struct mgmt_hdr *hdr = (void *) buf;
-	struct mgmt_cp_set_local_name *cp = (void *) &buf[sizeof(*hdr)];
-
-	DBG("index %d, name %s", index, name);
-
-	memset(buf, 0, sizeof(buf));
-	hdr->opcode = htobs(MGMT_OP_SET_LOCAL_NAME);
-	hdr->len = htobs(sizeof(*cp));
-	hdr->index = htobs(index);
-
-	strncpy((char *) cp->name, name, sizeof(cp->name) - 1);
-
-	if (write(mgmt_sock, buf, sizeof(buf)) < 0)
-		return -errno;
-
-	return 0;
-}
-
 static int mgmt_set_dev_class(int index, uint8_t major, uint8_t minor)
 {
 	char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_set_dev_class)];
diff --git a/src/mgmt.h b/src/mgmt.h
index 0c46c61..17f9f1e 100644
--- a/src/mgmt.h
+++ b/src/mgmt.h
@@ -29,7 +29,6 @@ int mgmt_set_powered(int index, gboolean powered);
 int mgmt_set_connectable(int index, gboolean connectable);
 int mgmt_set_discoverable(int index, gboolean discoverable, uint16_t timeout);
 int mgmt_set_pairable(int index, gboolean pairable);
-int mgmt_set_name(int index, const char *name);
 int mgmt_set_fast_connectable(int index, gboolean enable);
 
 int mgmt_start_discovery(int index);