A small footprint MQTT library

Dependents:   STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more

Files at this revision

API Documentation at this revision

Comitter:
AzureIoTClient
Date:
Tue Mar 20 10:30:11 2018 -0700
Parent:
24:75f5b91d1c6e
Child:
26:53b5ecbf74f9
Commit message:
1.2.1

Changed in this revision

mqtt_codec.c Show annotated file Show diff for this revision Revisions of this file
--- a/mqtt_codec.c	Thu Feb 15 11:36:32 2018 -0800
+++ b/mqtt_codec.c	Tue Mar 20 10:30:11 2018 -0700
@@ -483,7 +483,7 @@
                     }
                     packet[CONN_FLAG_BYTE_OFFSET] |= WILL_FLAG_FLAG;
                     byteutil_writeUTF(&iterator, mqttOptions->willTopic, (uint16_t)willTopicLen);
-                    packet[CONN_FLAG_BYTE_OFFSET] |= mqttOptions->qualityOfServiceValue;
+                    packet[CONN_FLAG_BYTE_OFFSET] |= (mqttOptions->qualityOfServiceValue << 3);
                     if (mqttOptions->messageRetain)
                     {
                         packet[CONN_FLAG_BYTE_OFFSET] |= WILL_RETAIN_FLAG;