Skip to content

Commit 85d5bb9

Browse files
committed
WiFi: make begin() return status()
1 parent 0e84629 commit 85d5bb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/SocketWrapper/WiFi.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class WiFiClass : public NetworkInterface {
1717
~WiFiClass() {
1818
}
1919

20-
bool begin(const char *ssid, const char *passphrase, wl_enc_type security = ENC_TYPE_UNKNOWN,
20+
int begin(const char *ssid, const char *passphrase, wl_enc_type security = ENC_TYPE_UNKNOWN,
2121
bool blocking = true) {
2222
sta_iface = net_if_get_wifi_sta();
2323
netif = sta_iface;
@@ -43,10 +43,10 @@ class WiFiClass : public NetworkInterface {
4343
NULL, K_FOREVER);
4444
}
4545

46-
return true;
46+
return status();
4747
}
4848

49-
bool beginAP(char *ssid, char *passphrase, int channel = WIFI_CHANNEL_ANY,
49+
int beginAP(char *ssid, char *passphrase, int channel = WIFI_CHANNEL_ANY,
5050
bool blocking = true) {
5151
if (ap_iface != NULL) {
5252
return false;
@@ -76,7 +76,7 @@ class WiFiClass : public NetworkInterface {
7676
NULL, K_FOREVER);
7777
}
7878

79-
return true;
79+
return status();
8080
}
8181

8282
int status() {

0 commit comments

Comments
 (0)