USE YHTANG AWS ACCOUNT TO TEST MQTT
Dependents: NuMaker-mbed-AWS-IoT-example
Diff: MQTTAsync.h
- Revision:
- 62:50950f0d9c96
- Parent:
- 23:05fc7de97d4a
--- a/MQTTAsync.h Tue Apr 16 16:37:11 2019 +0800 +++ b/MQTTAsync.h Tue Apr 16 16:22:26 2019 +0800 @@ -476,8 +476,9 @@ atimer.countdown(limits.command_timeout_ms); MQTTString topic = {(char*)topicFilter, 0, 0}; - - int len = MQTTSerialize_subscribe(buf, limits.MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic, (int*)&qos); + + int qos_int = qos; + int len = MQTTSerialize_subscribe(buf, limits.MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic, &qos_int); int rc = sendPacket(len, atimer.left_ms()); // send the subscribe packet if (rc != len) goto exit; // there was a problem