USE YHTANG AWS ACCOUNT TO TEST MQTT
Dependents: NuMaker-mbed-AWS-IoT-example
Diff: MQTTClient.h
- Revision:
- 62:50950f0d9c96
- Parent:
- 61:20d53aa127ea
--- a/MQTTClient.h Tue Apr 16 16:37:11 2019 +0800 +++ b/MQTTClient.h Tue Apr 16 16:22:26 2019 +0800 @@ -857,11 +857,12 @@ Timer timer(command_timeout_ms); int len = 0; MQTTString topic = {(char*)topicFilter, {0, 0}}; + int qos_int = qos; if (!isconnected) goto exit; - len = MQTTSerialize_subscribe(sendbuf, MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic, (int*)&qos); + len = MQTTSerialize_subscribe(sendbuf, MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic, &qos_int); if (len <= 0) goto exit; if ((rc = sendPacket(len, timer)) != SUCCESS) // send the subscribe packet