1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Fix hostname management (#8626)

* manage hostname with sdk string
This commit is contained in:
david gauchard
2022-07-06 22:57:58 +02:00
committed by GitHub
parent 65d30437f0
commit a8e3786d38
3 changed files with 31 additions and 12 deletions

View File

@ -309,10 +309,12 @@ extern "C"
return wifi_station_get_config(config);
}
char wifi_station_get_hostname_str[128];
const char* wifi_station_get_hostname(void)
extern "C" char* wifi_station_hostname; // exists in nonosdk
char wifi_station_hostname_str[33] { "esposix" };
char* wifi_station_hostname = wifi_station_hostname_str;
const char* wifi_station_get_hostname(void)
{
return strcpy(wifi_station_get_hostname_str, "esposix");
return wifi_station_hostname;
}
bool wifi_station_get_reconnect_policy()