From 56ff8260a1baf230cfaac07e1a8ca97172786356 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Wed, 30 Mar 2022 16:16:06 +0200 Subject: [PATCH] remove warnings --- mqtt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mqtt.c b/mqtt.c index 1b3ad1b..dce7477 100644 --- a/mqtt.c +++ b/mqtt.c @@ -35,8 +35,8 @@ void messageArrived(MessageData* md) void mqtt_pub(Client* mqtt_client, char * mqtt_topic, char * mqtt_msg, int mqtt_msg_len) { - static uint32_t mqtt_pub_count = 0; - static uint8_t mqtt_err_cnt = 0; + //static uint32_t mqtt_pub_count = 0; + //static uint8_t mqtt_err_cnt = 0; int32_t mqtt_rc; //printf(">>MQTT pub msg nr%lu ", ++mqtt_pub_count); @@ -49,17 +49,17 @@ void mqtt_pub(Client* mqtt_client, char * mqtt_topic, char * mqtt_msg, int mqtt_ //Analize MQTT publish result (for MQTT failover mode) if (mqtt_rc == SUCCESSS) { - mqtt_err_cnt = 0; + //mqtt_err_cnt = 0; //printf(" - OK\r\n"); } else { printf("mqtt pub - ERROR\r\n"); - //Reboot device after 20 continuous errors (~ 20sec) + printf("Connection with MQTT Broker was lost!!\r\nReboot the board..\r\n"); while(1); + //Reboot device after 20 continuous errors (~ 20sec) //if(mqtt_err_cnt++ > 20) //{ - // printf("Connection with MQTT Broker was lost!!\r\nReboot the board..\r\n"); // while(1); //} }