@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user