acassis commented on code in PR #1748:
URL: https://github.com/apache/nuttx-apps/pull/1748#discussion_r1192980021
##########
netutils/mqttc/0001_add_connection_status.patch:
##########
@@ -0,0 +1,25 @@
+diff -Naur MQTT-C_orig/include/mqtt.h MQTT-C/include/mqtt.h
+--- MQTT-C_orig/include/mqtt.h 2021-03-29 14:53:52.000000000 -0300
++++ MQTT-C/include/mqtt.h 2023-05-12 19:45:20.090216999 -0300
+@@ -1233,6 +1233,9 @@
+
+ /** @brief The sending message queue. */
+ struct mqtt_message_queue mq;
++
++ /** @brief Flag is set on connection event */
++ bool event_connect;
+ };
+
+ /**
+diff -Naur MQTT-C_orig/src/mqtt.c MQTT-C/src/mqtt.c
+--- MQTT-C_orig/src/mqtt.c 2021-03-29 14:53:52.000000000 -0300
++++ MQTT-C/src/mqtt.c 2023-05-12 19:51:38.675627411 -0300
+@@ -732,6 +732,8 @@
+ mqtt_recv_ret = MQTT_ERROR_CONNECTION_REFUSED;
+ }
+ break;
++ } else {
++ client->event_connect = true;
Review Comment:
I did exactly how Pieter implemented here:
https://github.com/LiamBindle/MQTT-C/issues/163
But I agree, it is better to clear this flag in other places, I'll update
the patch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]