diff -r 5cf6f099c897 -r 18ace27338e5 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Sat Mar 26 14:43:31 2016 +0100 +++ b/thermferm/rdconfig.c Sat Apr 30 21:06:20 2016 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014-2015 + * Copyright (C) 2014-2016 * * Michiel Broek * @@ -64,7 +64,13 @@ Config.temp_value = 20000; Config.temp_state = Config.hum_state = 1; // missing Config.hum_value = 50000; - +#ifdef HAVE_MOSQUITTO_H + if (Config.mosq_host) + free(Config.mosq_host); + Config.mosq_host = NULL; + Config.mosq_port = 1883; +#endif + for (tmp2 = Config.units; tmp2; tmp2 = tmp2->next) { if (tmp2->uuid) free(tmp2->uuid); @@ -1976,6 +1982,11 @@ } syslog(LOG_NOTICE, "rdconfig: using %s", mypath); +#ifdef HAVE_MOSQUITTO_H + Config.mosq_host = xstrcpy((char *)"localhost"); + Config.mosq_port = 1883; +#endif + if ((cur = xmlDocGetRootElement(doc)) == NULL) { syslog(LOG_NOTICE, "XML file %s empty.", mypath); xmlFreeDoc(doc);