File tree 3 files changed +5
-5
lines changed
DNSServer/examples/CaptivePortalAdvanced
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ void handleWifi() {
73
73
Serial.println (" scan done" );
74
74
if (n > 0 ) {
75
75
for (int i = 0 ; i < n; i++) {
76
- server.sendContent (String () + " \r\n <tr><td>SSID " + String ( WiFi.SSID (i) ) + String ((WiFi.encryptionType (i) == ENC_TYPE_NONE)?" " :" *" ) + " (" + WiFi.RSSI (i) + " )</td></tr>" );
76
+ server.sendContent (String () + " \r\n <tr><td>SSID " + WiFi.SSID (i) + String ((WiFi.encryptionType (i) == ENC_TYPE_NONE)?" " :" *" ) + " (" + WiFi.RSSI (i) + " )</td></tr>" );
77
77
}
78
78
} else {
79
79
server.sendContent (String () + " <tr><td>No WLAN found</td></tr>" );
Original file line number Diff line number Diff line change @@ -536,13 +536,13 @@ void * ESP8266WiFiClass::_getScanInfoByIndex(int i)
536
536
return reinterpret_cast <bss_info*>(ESP8266WiFiClass::_scanResult) + i;
537
537
}
538
538
539
- const char * ESP8266WiFiClass::SSID (uint8_t i)
539
+ String ESP8266WiFiClass::SSID (uint8_t i)
540
540
{
541
541
struct bss_info * it = reinterpret_cast <struct bss_info *>(_getScanInfoByIndex (i));
542
542
if (!it)
543
- return 0 ;
543
+ return " " ;
544
544
545
- return reinterpret_cast <const char *>(it->ssid );
545
+ return String ( reinterpret_cast <const char *>(it->ssid ) );
546
546
}
547
547
548
548
uint8_t * ESP8266WiFiClass::BSSID (uint8_t i)
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ class ESP8266WiFiClass
239
239
*
240
240
* return: ssid string of the specified item on the networks scanned list
241
241
*/
242
- const char * SSID (uint8_t networkItem);
242
+ String SSID (uint8_t networkItem);
243
243
244
244
/*
245
245
* Return the encryption type of the networks discovered during the scanNetworks
You can’t perform that action at this time.
0 commit comments