Skip to content

Commit 13ded58

Browse files
committed
Change connack rc to unsigned char to match C and MQTTPacket #146
1 parent 895a3fa commit 13ded58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MQTTClient/src/MQTTClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct MessageData
7171

7272
struct connackData
7373
{
74-
int rc;
74+
unsigned char rc;
7575
bool sessionPresent;
7676
};
7777

@@ -773,7 +773,7 @@ int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::connect(MQTTPacket_co
773773
data.rc = 0;
774774
data.sessionPresent = false;
775775
if (MQTTDeserialize_connack((unsigned char*)&data.sessionPresent,
776-
(unsigned char*)&data.rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
776+
&data.rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
777777
rc = data.rc;
778778
else
779779
rc = FAILURE;

0 commit comments

Comments
 (0)