From cc741ae01e964c0ea22cee6712ccc7b334004c23 Mon Sep 17 00:00:00 2001 From: technyon Date: Wed, 7 Jun 2023 17:35:33 +0200 Subject: [PATCH] Revert "fix mqttlogger path" This reverts commit aac4f902f7f0858bbff9ec215c8867d098ad706d. --- networkDevices/EthLan8720Device.cpp | 3 +-- networkDevices/W5500Device.cpp | 3 +-- networkDevices/WifiDevice.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/networkDevices/EthLan8720Device.cpp b/networkDevices/EthLan8720Device.cpp index cb40ed6..2c56464 100644 --- a/networkDevices/EthLan8720Device.cpp +++ b/networkDevices/EthLan8720Device.cpp @@ -54,8 +54,7 @@ EthLan8720Device::EthLan8720Device(const String& hostname, Preferences* preferen _path = new char[200]; memset(_path, 0, sizeof(_path)); - String pathStr = "/"; - pathStr.concat(preferences->getString(preference_mqtt_lock_path)); + String pathStr = preferences->getString(preference_mqtt_lock_path); pathStr.concat(mqtt_topic_log); strcpy(_path, pathStr.c_str()); Log = new MqttLogger(this, _path, MqttLoggerMode::MqttAndSerial); diff --git a/networkDevices/W5500Device.cpp b/networkDevices/W5500Device.cpp index 9591748..615a938 100644 --- a/networkDevices/W5500Device.cpp +++ b/networkDevices/W5500Device.cpp @@ -56,8 +56,7 @@ void W5500Device::initialize() if(_preferences->getBool(preference_mqtt_log_enabled)) { - String pathStr = "/"; - pathStr.concat(_preferences->getString(preference_mqtt_lock_path)); + String pathStr = _preferences->getString(preference_mqtt_lock_path); pathStr.concat(mqtt_topic_log); _path = new char[pathStr.length() + 1]; memset(_path, 0, sizeof(_path)); diff --git a/networkDevices/WifiDevice.cpp b/networkDevices/WifiDevice.cpp index 7dea816..bb66d42 100644 --- a/networkDevices/WifiDevice.cpp +++ b/networkDevices/WifiDevice.cpp @@ -46,8 +46,7 @@ WifiDevice::WifiDevice(const String& hostname, Preferences* _preferences, const _path = new char[200]; memset(_path, 0, sizeof(_path)); - String pathStr = "/"; - pathStr.concat(_preferences->getString(preference_mqtt_lock_path)); + String pathStr = _preferences->getString(preference_mqtt_lock_path); pathStr.concat(mqtt_topic_log); strcpy(_path, pathStr.c_str()); Log = new MqttLogger(this, _path, MqttLoggerMode::MqttAndSerial);