[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[paho-dev] RSMB - will messages
|
Does RSMB fully support MQTTSN will messages?
RSMB will request a willmsg and willtopic if I set the will flag in a
connect message however I find my will message is never sent if my node
goes offline.
Also I found a bug in the embedded C MQTTSN library which stops you from
receiving MQTTS_WILLMSGREQ and MQTTS_WILLTOPICREQ messages as they are
only two bytes long. (see below for the one line fix)
Regards
Simon
diff --git a/src/MQTTSNPacket.c b/src/MQTTSNPacket.c
index 4f98b6a..944d716 100644
--- a/src/MQTTSNPacket.c
+++ b/src/MQTTSNPacket.c
@@ -249,7 +249,7 @@ int MQTTSNstrlen(MQTTSNString MQTTSNString)
int MQTTSNPacket_read(unsigned char* buf, int buflen, int
(*getfn)(unsigned char*, int))
{
int rc = MQTTSNPACKET_READ_ERROR;
- const int MQTTSN_MIN_PACKET_LENGTH = 3;
+ const int MQTTSN_MIN_PACKET_LENGTH = 2;
int len = 0; /* the length of the whole packet including length
field */
int lenlen = 0;
int datalen = 0;