only retain global/version and global/running

This commit is contained in:
john30
2017-06-03 12:44:59 +02:00
parent 348c79d7a4
commit be33defbfb
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -485,8 +485,8 @@ void MqttHandler::run() {
time(&now); time(&now);
start = lastTaskRun = now; start = lastTaskRun = now;
publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION); publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION, true);
publishTopic(m_globalTopic+"running", "true"); publishTopic(m_globalTopic+"running", "true", true);
publishTopic(signalTopic, "false"); publishTopic(signalTopic, "false");
mosquitto_message_callback_set(m_mosquitto, on_message); mosquitto_message_callback_set(m_mosquitto, on_message);
string subTopic = getTopic(NULL, "#"); string subTopic = getTopic(NULL, "#");
+1 -1
View File
@@ -116,7 +116,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread {
* @param data the data string. * @param data the data string.
* @param retain whether the topic shall be retained. * @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. */ /** the @a MessageMap instance. */
MessageMap* m_messages; MessageMap* m_messages;