File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
hardware/esp8266com/esp8266/libraries
DNSServer/examples/CaptivePortalAdvanced Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ void handleWifi() {
7373 Serial.println (" scan done" );
7474 if (n > 0 ) {
7575 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>" );
7777 }
7878 } else {
7979 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)
536536 return reinterpret_cast <bss_info*>(ESP8266WiFiClass::_scanResult) + i;
537537}
538538
539- const char * ESP8266WiFiClass::SSID (uint8_t i)
539+ String ESP8266WiFiClass::SSID (uint8_t i)
540540{
541541 struct bss_info * it = reinterpret_cast <struct bss_info *>(_getScanInfoByIndex (i));
542542 if (!it)
543- return 0 ;
543+ return " " ;
544544
545- return reinterpret_cast <const char *>(it->ssid );
545+ return String ( reinterpret_cast <const char *>(it->ssid ) );
546546}
547547
548548uint8_t * ESP8266WiFiClass::BSSID (uint8_t i)
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ class ESP8266WiFiClass
239239 *
240240 * return: ssid string of the specified item on the networks scanned list
241241 */
242- const char * SSID (uint8_t networkItem);
242+ String SSID (uint8_t networkItem);
243243
244244 /*
245245 * Return the encryption type of the networks discovered during the scanNetworks
You can’t perform that action at this time.
0 commit comments