1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-04 18:03:20 +03:00

use String return for both SSID functions

This commit is contained in:
Pascal Gollor 2015-10-01 18:52:46 +02:00
parent cf424a9290
commit f1dcfb2794
2 changed files with 4 additions and 4 deletions

View File

@ -536,13 +536,13 @@ void * ESP8266WiFiClass::_getScanInfoByIndex(int i)
return reinterpret_cast<bss_info*>(ESP8266WiFiClass::_scanResult) + i;
}
const char* ESP8266WiFiClass::SSID(uint8_t i)
String ESP8266WiFiClass::SSID(uint8_t i)
{
struct bss_info* it = reinterpret_cast<struct bss_info*>(_getScanInfoByIndex(i));
if (!it)
return 0;
return "";
return reinterpret_cast<const char*>(it->ssid);
return String(reinterpret_cast<const char*>(it->ssid));
}
uint8_t * ESP8266WiFiClass::BSSID(uint8_t i)

View File

@ -239,7 +239,7 @@ public:
*
* return: ssid string of the specified item on the networks scanned list
*/
const char* SSID(uint8_t networkItem);
String SSID(uint8_t networkItem);
/*
* Return the encryption type of the networks discovered during the scanNetworks