Skip to content

Commit 39ab932

Browse files
author
Veijo Pesonen
committed
Rename internal member variable for consistency
1 parent d1412c4 commit 39ab932

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ESP8266Interface.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
ESP8266Interface::ESP8266Interface()
4747
: _esp(MBED_CONF_ESP8266_TX, MBED_CONF_ESP8266_RX, MBED_CONF_ESP8266_DEBUG, MBED_CONF_ESP8266_RTS, MBED_CONF_ESP8266_CTS),
4848
_initialized(false),
49-
_started(false)
49+
_started(false),
50+
_ap_sec(NSAPI_SECURITY_UNKNOWN)
5051
{
5152
memset(_ids, 0, sizeof(_ids));
5253
memset(_cbs, 0, sizeof(_cbs));
5354
memset(ap_ssid, 0, sizeof(ap_ssid));
5455
memset(ap_pass, 0, sizeof(ap_pass));
5556
memset(_local_ports, 0, sizeof(_local_ports));
56-
ap_sec = NSAPI_SECURITY_UNKNOWN;
5757

5858
_esp.sigio(this, &ESP8266Interface::event);
5959
_esp.set_timeout();
@@ -65,14 +65,14 @@ ESP8266Interface::ESP8266Interface()
6565
ESP8266Interface::ESP8266Interface(PinName tx, PinName rx, bool debug, PinName rts, PinName cts)
6666
: _esp(tx, rx, debug, rts, cts),
6767
_initialized(false),
68-
_started(false)
68+
_started(false),
69+
_ap_sec(NSAPI_SECURITY_UNKNOWN)
6970
{
7071
memset(_ids, 0, sizeof(_ids));
7172
memset(_cbs, 0, sizeof(_cbs));
7273
memset(ap_ssid, 0, sizeof(ap_ssid));
7374
memset(ap_pass, 0, sizeof(ap_pass));
7475
memset(_local_ports, 0, sizeof(_local_ports));
75-
ap_sec = NSAPI_SECURITY_UNKNOWN;
7676

7777
_esp.sigio(this, &ESP8266Interface::event);
7878
_esp.set_timeout();
@@ -102,7 +102,7 @@ int ESP8266Interface::connect()
102102
return NSAPI_ERROR_NO_SSID;
103103
}
104104

105-
if (ap_sec != NSAPI_SECURITY_NONE) {
105+
if (_ap_sec != NSAPI_SECURITY_NONE) {
106106
if (strlen(ap_pass) < ESP8266_PASSPHRASE_MIN_LENGTH) {
107107
return NSAPI_ERROR_PARAMETER;
108108
}
@@ -141,7 +141,7 @@ int ESP8266Interface::connect()
141141

142142
int ESP8266Interface::set_credentials(const char *ssid, const char *pass, nsapi_security_t security)
143143
{
144-
ap_sec = security;
144+
_ap_sec = security;
145145

146146
if (!ssid) {
147147
return NSAPI_ERROR_PARAMETER;
@@ -157,7 +157,7 @@ int ESP8266Interface::set_credentials(const char *ssid, const char *pass, nsapi_
157157
return NSAPI_ERROR_PARAMETER;
158158
}
159159

160-
if (ap_sec != NSAPI_SECURITY_NONE) {
160+
if (_ap_sec != NSAPI_SECURITY_NONE) {
161161

162162
if (!pass) {
163163
return NSAPI_ERROR_PARAMETER;

ESP8266Interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface
328328
int _started;
329329

330330
char ap_ssid[ESP8266_SSID_MAX_LENGTH + 1]; /* 32 is what 802.11 defines as longest possible name; +1 for the \0 */
331-
nsapi_security_t ap_sec;
331+
nsapi_security_t _ap_sec;
332332
uint8_t ap_ch;
333333
char ap_pass[ESP8266_PASSPHRASE_MAX_LENGTH + 1];
334334
uint16_t _local_ports[ESP8266_SOCKET_COUNT];

0 commit comments

Comments
 (0)