Skip to content

Commit 4e81d9e

Browse files
Patch paho MQTTSN for IAR to compile
1 parent 94e8d45 commit 4e81d9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paho_mqtt-sn_embedded_c/MQTTSNClient/src/MQTTSNClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class PacketId
8181

8282
int getNext()
8383
{
84-
return next = (next == MAX_PACKET_ID) ? 1 : ++next;
84+
return next = (next == MAX_PACKET_ID) ? 1 : next + 1;
8585
}
8686

8787
private:
@@ -700,7 +700,7 @@ int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::connect(MQTTSNPacket_con
700700
template<class Network, class Timer, int MAX_PACKET_SIZE, int b>
701701
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::connect()
702702
{
703-
MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer;
703+
MQTTSNPacket_connectData default_options = MQTTSNPacket_connectData_initializer;
704704
return connect(default_options);
705705
}
706706

0 commit comments

Comments
 (0)