diff options
-rw-r--r-- | confui/mesh_connector.h | 2 | ||||
-rw-r--r-- | confui/serial.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/confui/mesh_connector.h b/confui/mesh_connector.h index 1c9f938..ccab6bd 100644 --- a/confui/mesh_connector.h +++ b/confui/mesh_connector.h @@ -31,7 +31,7 @@ typedef struct { cd_mac_addr_t address; /** @brief node bluetooth mac address */ cd_uuid_t uuid; /** @brief node uuid */ size_t name_len; /** @brief name length in bytes */ - const char *name; /** @brief user-friendly node name */ + char *name; /** @brief user-friendly node name */ bool light_on; /** @brief state of light on node */ bool provisioned; /** @brief whether the node is provisioned into the network */ } cd_s_node; diff --git a/confui/serial.cpp b/confui/serial.cpp index bfb809e..c7a52e5 100644 --- a/confui/serial.cpp +++ b/confui/serial.cpp @@ -131,7 +131,7 @@ void cd_cmd_response_get_node_parse_node(cd_s_cmd_node* node) { memcpy(gui_node->address, node->address, sizeof(cd_mac_addr_t)); memcpy(gui_node->uuid, node->uuid, sizeof(cd_uuid_t)); gui_node->name_len = node->name_len; - if (gui_node->name != nullptr) free((char*) gui_node->name); // TODO: set name to non-const pointer + if (gui_node->name != nullptr) free(gui_node->name); char* name = (char*) malloc(node->name_len); memcpy(name, node->remaining_data, node->name_len); gui_node->name = name; |