From 13ded58b581958d806778f5b5b555b3c20d929d1 Mon Sep 17 00:00:00 2001 From: Ian Craggs Date: Tue, 1 Aug 2023 12:34:02 +0100 Subject: [PATCH] Change connack rc to unsigned char to match C and MQTTPacket #146 --- MQTTClient/src/MQTTClient.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MQTTClient/src/MQTTClient.h b/MQTTClient/src/MQTTClient.h index fc9dea5d..a8258f0e 100644 --- a/MQTTClient/src/MQTTClient.h +++ b/MQTTClient/src/MQTTClient.h @@ -71,7 +71,7 @@ struct MessageData struct connackData { - int rc; + unsigned char rc; bool sessionPresent; }; @@ -773,7 +773,7 @@ int MQTT::Client::connect(MQTTPacket_co data.rc = 0; data.sessionPresent = false; if (MQTTDeserialize_connack((unsigned char*)&data.sessionPresent, - (unsigned char*)&data.rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1) + &data.rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1) rc = data.rc; else rc = FAILURE;