From 1bb7abe27127c931c830bed8b0fbc4b94a6bec40 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 5 Nov 2020 20:37:07 +0200 Subject: [PATCH] Make setHostname return true --- libraries/WiFi/src/WiFiGeneric.cpp | 5 +++-- libraries/WiFi/src/WiFiGeneric.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/WiFi/src/WiFiGeneric.cpp b/libraries/WiFi/src/WiFiGeneric.cpp index 61caa6fd..4165e164 100644 --- a/libraries/WiFi/src/WiFiGeneric.cpp +++ b/libraries/WiFi/src/WiFiGeneric.cpp @@ -640,9 +640,10 @@ const char * WiFiGenericClass::getHostname() return get_esp_netif_hostname(); } -void WiFiGenericClass::setHostname(const char * hostname) +bool WiFiGenericClass::setHostname(const char * hostname) { - return set_esp_netif_hostname(hostname); + set_esp_netif_hostname(hostname); + return true; } int WiFiGenericClass::setStatusBits(int bits){ diff --git a/libraries/WiFi/src/WiFiGeneric.h b/libraries/WiFi/src/WiFiGeneric.h index aa200f32..adb11108 100644 --- a/libraries/WiFi/src/WiFiGeneric.h +++ b/libraries/WiFi/src/WiFiGeneric.h @@ -171,7 +171,7 @@ class WiFiGenericClass wifi_power_t getTxPower(); static const char * getHostname(); - static void setHostname(const char * hostname); + static bool setHostname(const char * hostname); static esp_err_t _eventCallback(arduino_event_t *event);