From 2adbe248757358f3b6866d176f277227cb2981c8 Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 14 Oct 2017 12:03:00 +0200 Subject: [PATCH] fix for missing default topic (issue #12) --- src/ebusd/mqtthandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ebusd/mqtthandler.cpp b/src/ebusd/mqtthandler.cpp index 7068af09..fb019820 100644 --- a/src/ebusd/mqtthandler.cpp +++ b/src/ebusd/mqtthandler.cpp @@ -194,6 +194,9 @@ static const struct argp_child g_mqtt_argp_child = {&g_mqtt_argp, 0, "", 1}; const struct argp_child* mqtthandler_getargs() { + if (g_topicStrs.empty()) { + g_topicStrs.push_back(PACKAGE); + } return &g_mqtt_argp_child; }