From 7832dab4e94fdc6ff29dfdfb5b533b532dd7d631 Mon Sep 17 00:00:00 2001 From: neo Date: Mon, 6 Sep 2021 09:40:28 +0000 Subject: [PATCH 1/2] fix bssid len bug --- host/host_common/commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/host_common/commands.c b/host/host_common/commands.c index 968897892b..deadf737ea 100644 --- a/host/host_common/commands.c +++ b/host/host_common/commands.c @@ -512,8 +512,8 @@ int wifi_get_ap_config (esp_hosted_control_config_t *ap_config) } if (resp->resp_get_ap_config->bssid.data) { strncpy((char *)ap_config->station.bssid, - (char *)resp->resp_get_ap_config->bssid.data, MAC_LENGTH); - ap_config->station.bssid[MAC_LENGTH-1] = '\0'; + (char *)resp->resp_get_ap_config->bssid.data, BSSID_LENGTH); + ap_config->station.bssid[BSSID_LENGTH-1] = '\0'; } ap_config->station.channel = resp->resp_get_ap_config->chnl; From d1de4ff914a954d45126feb2283e449ecb990f3c Mon Sep 17 00:00:00 2001 From: neo Date: Tue, 14 Sep 2021 00:39:50 +0000 Subject: [PATCH 2/2] fix mac address len issue --- host/host_common/commands.c | 2 +- host/stm32/app/control/control.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host/host_common/commands.c b/host/host_common/commands.c index deadf737ea..1203ac8f06 100644 --- a/host/host_common/commands.c +++ b/host/host_common/commands.c @@ -18,7 +18,7 @@ #define SUCCESS 0 #define FAILURE -1 -#define MAC_LENGTH 19 +#define MAC_LENGTH 18 #define MAX_SSID_LENGTH 32 #define MIN_PWD_LENGTH 8 #define MAX_PWD_LENGTH 64 diff --git a/host/stm32/app/control/control.h b/host/stm32/app/control/control.h index 76b2dd1360..e2bd45ba14 100644 --- a/host/stm32/app/control/control.h +++ b/host/stm32/app/control/control.h @@ -123,7 +123,7 @@ typedef enum control_path_events_s { #endif -#define WIFI_MAX_STR_LEN 19 +#define WIFI_MAX_STR_LEN 18 /** Exported Structures **/