eclipse / mosquitto.rsmb

Mosquitto rsmb
85 stars 42 forks source link

Python MQTT-SN client crashes with qos = -1 #2

Open ralight opened 8 years ago

ralight commented 8 years ago

migrated from Bugzilla #463425 status UNCONFIRMED severity normal in component RSMB for 1.4 Reported in version unspecified on platform PC Assigned to: Ian Craggs

On 2015-03-30 05:57:28 -0400, Joao Mauricio wrote:

When QoS is set to -1:

aclient.connect() aclient.register(“jkjkjkjkj”) aclient.publish(1, “aaaa”, -1)

Python MQTT-SN client crashes with the following error:

Traceback (most recent call last): File “./MQTTSNregister.py”, line 33, in aclient.publish(1, “aaaa”, -1) File “/root/rsmb/rsmb/src/MQTTSClient/Python/MQTTSNclient.py”, line 180, in publish self.sock.send(publish.pack()) File “/root/rsmb/rsmb/src/MQTTSClient/Python/MQTTSN.py”, line 491, in pack buffer = self.Flags.pack() File “/root/rsmb/rsmb/src/MQTTSClient/Python/MQTTSN.py”, line 107, in pack (self.Will << 3) | (self.CleanSession << 2) | self.TopicIdType ) ValueError: chr() arg not in range(256)

However, using:

aclient.connect() aclient.register(“jkjkjkjkj”) aclient.publish(1, “aaaa”, 0)

everything works as expected.