Merge 6d27ad56c5 into e6b229bf7d
This commit is contained in:
commit
01a142bb60
2 changed files with 3 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ extern "C" {
|
|||
|
||||
// Array of data to cache the information related to the networks discovered
|
||||
char WiFiDrv::_networkSsid[][WL_SSID_MAX_LENGTH] = {{"1"},{"2"},{"3"},{"4"},{"5"}};
|
||||
char WiFiDrv::nullTermSsid[WL_SSID_MAX_LENGTH + 1]{};
|
||||
|
||||
// Cached values of retrieved data
|
||||
char WiFiDrv::_ssid[] = {0};
|
||||
|
|
@ -566,7 +567,7 @@ const char* WiFiDrv::getSSIDNetoworks(uint8_t networkItem)
|
|||
if (networkItem >= WL_NETWORKS_LIST_MAXNUM)
|
||||
return (char*)NULL;
|
||||
|
||||
return _networkSsid[networkItem];
|
||||
return strncpy(nullTermSsid, _networkSsid[networkItem], WL_SSID_MAX_LENGTH);
|
||||
}
|
||||
|
||||
uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t networkItem)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class WiFiDrv
|
|||
private:
|
||||
// settings of requested network
|
||||
static char _networkSsid[WL_NETWORKS_LIST_MAXNUM][WL_SSID_MAX_LENGTH];
|
||||
static char nullTermSsid[WL_SSID_MAX_LENGTH + 1];
|
||||
|
||||
// firmware version string in the format a.b.c
|
||||
static char fwVersion[WL_FW_VER_LENGTH];
|
||||
|
|
|
|||
Loading…
Reference in a new issue