OSDN Git Service

core: Remove unused mgmt_set_name function
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 4 Jan 2013 12:34:43 +0000 (14:34 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 4 Jan 2013 12:34:43 +0000 (14:34 +0200)
src/mgmt.c
src/mgmt.h

index 1b6f02e..449d947 100644 (file)
@@ -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)];
index 0c46c61..17f9f1e 100644 (file)
@@ -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);