From be33defbfb4667c8470cd418530c6e2f979edb11 Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 3 Jun 2017 12:44:59 +0200 Subject: [PATCH] only retain global/version and global/running --- src/ebusd/mqtthandler.cpp | 4 ++-- src/ebusd/mqtthandler.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ebusd/mqtthandler.cpp b/src/ebusd/mqtthandler.cpp index 893763ad..b770e706 100644 --- a/src/ebusd/mqtthandler.cpp +++ b/src/ebusd/mqtthandler.cpp @@ -485,8 +485,8 @@ void MqttHandler::run() { time(&now); start = lastTaskRun = now; - publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION); - publishTopic(m_globalTopic+"running", "true"); + publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION, true); + publishTopic(m_globalTopic+"running", "true", true); publishTopic(signalTopic, "false"); mosquitto_message_callback_set(m_mosquitto, on_message); string subTopic = getTopic(NULL, "#"); diff --git a/src/ebusd/mqtthandler.h b/src/ebusd/mqtthandler.h index ec3c38db..cc2c1f34 100644 --- a/src/ebusd/mqtthandler.h +++ b/src/ebusd/mqtthandler.h @@ -116,7 +116,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread { * @param data the data string. * @param retain whether the topic shall be retained. */ - void publishTopic(const string& topic, const string& data, bool retain = true); + void publishTopic(const string& topic, const string& data, bool retain = false); /** the @a MessageMap instance. */ MessageMap* m_messages;