diff -r e2889b17f48c -r c382a6c58c20 thermferm/mqtt.c --- a/thermferm/mqtt.c Wed Jul 18 13:26:37 2018 +0200 +++ b/thermferm/mqtt.c Thu Jul 19 12:47:52 2018 +0200 @@ -447,13 +447,10 @@ payload = NULL; } -#endif void publishDData(units_list *unit) { -#ifdef HAVE_MOSQUITTO_H - char *payload = NULL, *topic = NULL; if (mqtt_use) { @@ -468,15 +465,12 @@ free(topic); topic = NULL; } -#endif } void publishDBirth(units_list *unit) { -#ifdef HAVE_MOSQUITTO_H - char *payload = NULL, *topic = NULL; if (mqtt_use) { @@ -491,15 +485,12 @@ free(topic); topic = NULL; } -#endif } void publishDDeath(units_list *unit) { -#ifdef HAVE_MOSQUITTO_H - char *topic = NULL; if (mqtt_use) { @@ -515,14 +506,12 @@ free(topic); topic = NULL; } -#endif } void publishNData(bool birth, int flag) { -#ifdef HAVE_MOSQUITTO_H char *payload = NULL, sidx[10], buf[64]; struct utsname ubuf; bool comma = false; @@ -602,14 +591,12 @@ free(payload); payload = NULL; } -#endif } void mqtt_connect(void) { -#ifdef HAVE_MOSQUITTO_H char *id = NULL; char err[1024]; int rc; @@ -681,14 +668,12 @@ publishNData(true, 0); publishDBirthAll(); } -#endif } void mqtt_disconnect(void) { -#ifdef HAVE_MOSQUITTO_H int rc; if (mqtt_use) { @@ -732,8 +717,7 @@ mqtt_my_shutdown = FALSE; syslog(LOG_NOTICE, "MQTT disconnected"); } -#endif } - +#endif