Merge pull request #8566 from u-blox/github8520issue

Wifi: ublox fix to keep the credentials stored
pull/8590/head
Cruz Monrreal 2018-10-30 08:47:58 -05:00 committed by GitHub
commit 1bbcfff8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -220,8 +220,8 @@ nsapi_error_t OdinWiFiInterface::set_credentials(const char *ssid, const char *p
osStatus res = _mutex.lock();
MBED_ASSERT(res == osOK);
_sta.ssid = ssid;
_sta.passwd = pass;
strncpy(_sta.ssid, ssid, cbWLAN_SSID_MAX_LENGTH);
strncpy(_sta.passwd, pass, cbWLAN_MAX_PASSPHRASE_LENGTH);
_sta.security = security;
res = _mutex.unlock();

View File

@ -262,8 +262,8 @@ private:
};
struct sta_s {
const char *ssid;
const char *passwd;
char ssid[cbWLAN_SSID_MAX_LENGTH];
char passwd[cbWLAN_MAX_PASSPHRASE_LENGTH];
nsapi_security_t security;
uint8_t channel;
int timeout_ms;