mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-14 11:50:20 +03:00
fix standalone
This commit is contained in:
@@ -1792,6 +1792,7 @@ std::string System::get_metrics_prometheus() {
|
|||||||
// return IP or hostname of the EMS-ESP device
|
// return IP or hostname of the EMS-ESP device
|
||||||
String System::get_ip_or_hostname() {
|
String System::get_ip_or_hostname() {
|
||||||
String result = "ems-esp";
|
String result = "ems-esp";
|
||||||
|
#ifndef EMSESP_STANDALONE
|
||||||
EMSESP::esp32React.getNetworkSettingsService()->read([&](NetworkSettings & settings) {
|
EMSESP::esp32React.getNetworkSettingsService()->read([&](NetworkSettings & settings) {
|
||||||
if (settings.enableMDNS) {
|
if (settings.enableMDNS) {
|
||||||
if (EMSESP::system_.ethernet_connected()) {
|
if (EMSESP::system_.ethernet_connected()) {
|
||||||
@@ -1808,6 +1809,7 @@ String System::get_ip_or_hostname() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user