Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bssid and mac len bug #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions host/host_common/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion host/stm32/app/control/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 **/

Expand Down