]> mj.ucw.cz Git - home-hw.git/blobdiff - aircon/daemon/burrow-aircond.c
Updated to new MQTT server and fixed a couple of bugs
[home-hw.git] / aircon / daemon / burrow-aircond.c
index d33ba6cee1cb25de2693dd2704a4b875394e97ed..7db3864ca9f4bf3b9fb425f3eb724bb7c1eaf0db 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
+#include <time.h>
 #include <unistd.h>
 
 #include <modbus.h>
@@ -57,7 +58,7 @@ static void mqtt_publish(const char *topic, const char *fmt, ...)
        va_end(args);
 }
 
-static void mqtt_log_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int level, const char *message)
+static void mqtt_log_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int level UNUSED, const char *message UNUSED)
 {
        // msg(L_INFO, "MQTT(%d): %s", level, message);
 }
@@ -149,6 +150,7 @@ static bool mb_connect(void)
        }
 
        mb_is_open = true;
+       return true;
 }
 
 /*** Main loop ***/