]> the.earth.li Git - mqtt-arp.git/commitdiff
Fix setting of default options
authorJonathan McDowell <noodles@earth.li>
Thu, 13 Sep 2018 17:38:18 +0000 (18:38 +0100)
committerJonathan McDowell <noodles@earth.li>
Thu, 13 Sep 2018 17:38:18 +0000 (18:38 +0100)
mqtt_topic / location were never being set with their defaults.

mqtt-arp.c

index 71d8567e39653ca73b2fc75b5d70eebdc676ca02..de0fcccea27cce24f0f2b4ffb3aeb6fcda8cc2b0 100644 (file)
@@ -366,9 +366,9 @@ int main(int argc, char *argv[])
        if (!config.mqtt_host)
                config.mqtt_host = MQTT_HOST;
        if (!config.mqtt_topic)
-               config.mqtt_host = MQTT_TOPIC;
+               config.mqtt_topic = MQTT_TOPIC;
        if (!config.location)
-               config.mqtt_host = LOCATION;
+               config.location = LOCATION;
 
        signal(SIGTERM, shutdown_request);