From: Jonathan McDowell Date: Thu, 13 Sep 2018 17:38:18 +0000 (+0100) Subject: Fix setting of default options X-Git-Url: https://the.earth.li/gitweb/?p=mqtt-arp.git;a=commitdiff_plain;h=8742da72f15ac87fc3f61acaa1ad02e2964c1868 Fix setting of default options mqtt_topic / location were never being set with their defaults. --- diff --git a/mqtt-arp.c b/mqtt-arp.c index 71d8567..de0fccc 100644 --- a/mqtt-arp.c +++ b/mqtt-arp.c @@ -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);