Fix QOS arguments parsing for mqttc_pub#3415
Conversation
|
Thank you @dmihai03 :-)
|
Modify the switch cases in parsearg function for QOS levels definition. The comparison was made between a long value and a char. Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
|
@dmihai03 nice finding! Thank you for submitting this fix. BTW, could you please fix this typo that the CI found: |
Modify the message logged when mqtt_init() failed to execute properly. Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
|
Uhm, still some Linux build problem, CI restarted. |
@cederom did you restarted the CI or did you restart only failing Jobs? Full restart can delay more, face similar issues and use more Runners |
|
I'm going to restart failing Jobs (I already did it two times). @simbit18 seems like msvc is failing most of the time. BTW, the check is failing because MQTT CamelCase names, but let's ignore it |
|
Okay so there is something more to fix here lets investigate :-) |
Hi @acassis, Runner images can fail for a thousand reasons, and sometimes it's not our fault but GitHub. This can happen for images for macOS, x64 Linux, and Windows images. |
|
@dmihai03 please fix update |

Summary
Modify the switch cases in parsearg function for QOS levels definition. The comparison was made between a long value and a char.
Impact
All the 2 levels of QOS are now supported by the mqtt publisher example.
Testing
Host used for build:
Target used for verification:
Connected the board to laptop's hotspot and dumped the packets in Wireshark. The broker used in testing is broker.hivemq.com.
For every QOS level the right handshakes are triggered.
Before:
Before the changes, both QOS 1 and QOS 2 message publishing looked like this:
They were sent with QOS 0, fire and forget, because the QOS level was not modified in the packet.
After:
QOS 1 handshake:

QOS 2 handshake:
