Skip to content

Commit

Permalink
Change connack rc to unsigned char to match C and MQTTPacket #146
Browse files Browse the repository at this point in the history
  • Loading branch information
icraggs committed Aug 1, 2023
1 parent 895a3fa commit 13ded58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MQTTClient/src/MQTTClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct MessageData

struct connackData
{
int rc;
unsigned char rc;
bool sessionPresent;
};

Expand Down Expand Up @@ -773,7 +773,7 @@ int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::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;
Expand Down

0 comments on commit 13ded58

Please sign in to comment.