]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB logger: fixup
authorMartin Mares <mj@ucw.cz>
Sat, 1 Jan 2022 19:34:28 +0000 (20:34 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 1 Jan 2022 19:34:28 +0000 (20:34 +0100)
bsb/logger/burrow-bsb-logger.c

index dbcc1545b85861b13f95ba3bc882464ea58294c0..4fbef56bb9701da3d5eb695111c5462962058655 100644 (file)
@@ -34,20 +34,18 @@ static void mqtt_publish(const char *topic, const char *fmt, ...)
        va_list args;
        va_start(args, fmt);
 
-       if (1) {
-               char m[256];
-               int l = vsnprintf(m, sizeof(m), fmt, args);
-               int err = mosquitto_publish(mosq, NULL, topic, l, m, 0, true);
-               if (err != MOSQ_ERR_SUCCESS)
-                       mqtt_error("publish", err, false);
-       }
+       char m[256];
+       int l = vsnprintf(m, sizeof(m), fmt, args);
+       int err = mosquitto_publish(mosq, NULL, topic, l, m, 0, true);
+       if (err != MOSQ_ERR_SUCCESS)
+               mqtt_error("publish", err, false);
 
        va_end(args);
 }
 
 static void mqtt_log_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int level, const char *message)
 {
-       msg(L_INFO, "MQTT(%d): %s", level, message);
+       // msg(L_INFO, "MQTT(%d): %s", level, message);
 }
 
 static void mqtt_conn_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int status)