eclipse-paho / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
https://eclipse.org/paho
Other
1.37k stars 757 forks source link

fix mqtt5 user property error, string pair should not use type of union. #234

Closed MrEthan closed 1 year ago

MrEthan commented 2 years ago

when we use type union to store the string pair, the key and value of string pair will be the same.

xmh142857 commented 2 years ago

nice

CIPop commented 1 year ago

Thanks @MrEthan! I found the same issue while writing some samples for V5 packet.

The (original) test examples do not work with test.mosquitto.org if I set the lengths to include the NULL character.

Otherwise, I was able to cherry-pick your change and successfully PUB user properties. All 6 tests also passed with your changes.

icraggs commented 1 year ago

Closing as superseded by #241