MQTT: remove accidentally committed debug printfs + cosmetic
authorEdouard Tisserant <edouard@beremiz.fr>
Thu, 19 Sep 2024 15:12:45 +0200
changeset 4017 3977d55217ec
parent 4016 9e4a3a3ea5c0
child 4018 fa60dde482ca
MQTT: remove accidentally committed debug printfs + cosmetic
mqtt/mqtt_client_gen.py
mqtt/mqtt_template.c
--- a/mqtt/mqtt_client_gen.py	Thu Sep 19 12:06:53 2024 +0200
+++ b/mqtt/mqtt_client_gen.py	Thu Sep 19 15:12:45 2024 +0200
@@ -407,7 +407,7 @@
             formatdict["publish_changes"] += """
             PUBLISH_CHANGE({encoding}, {Topic}, {QoS}, {C_type}, {c_loc_name}, {Retained})""".format(**locals())
 
-        # inputs need to be sorted for bisection search 
+        # inputs need to be sorted for bisection search
         for row in sorted(self["input"]):
             Topic, QoS, iec_type, iec_number = row
             if iec_type in MQTT_IEC_types:
--- a/mqtt/mqtt_template.c	Thu Sep 19 12:06:53 2024 +0200
+++ b/mqtt/mqtt_template.c	Thu Sep 19 15:12:45 2024 +0200
@@ -19,8 +19,6 @@
         char mstr[256];                                                                           \
         snprintf(mstr, 255, __VA_ARGS__);                                                         \
         LogMessage(level, mstr, strlen(mstr));                                                    \
-        printf(__VA_ARGS__);                                                                      \
-        fflush(stdout);                                                                           \
     }}
 
 #define LogInfo(...) _Log(LOG_INFO, __VA_ARGS__);
@@ -226,8 +224,6 @@
         // compare strings as far as possible
         res = strncmp(topics[mid].topic, topicName, len);
 
-        printf("%*s %s topic_len %d, delta_len %d, topicLen %d, len %d, res %d, low %d, mid %d, high %d\n", topicLen, topicName, topics[mid].topic, topics[mid].topic_len, delta_len, topicLen, len, res, low, mid, high);
-
         // if partial comparison matches, longest string is the greatest
         if (res == 0)
             // update res to continue bisection