Microsoft Azure IoTHub client MQTT transport
Dependents: STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more
Diff: iothubtransportmqtt.c
- Revision:
- 9:50744bd8239e
- Parent:
- 8:418a3b812584
- Child:
- 10:c61c16bb63e6
--- a/iothubtransportmqtt.c Fri Aug 12 10:03:50 2016 -0700 +++ b/iothubtransportmqtt.c Fri Sep 09 13:37:32 2016 -0700 @@ -1050,17 +1050,8 @@ return result; } -/*forward declaration*/ -static void IoTHubTransportMqtt_Unsubscribe(IOTHUB_DEVICE_HANDLE handle); - static void DisconnectFromClient(PMQTTTRANSPORT_HANDLE_DATA transportState) { - /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_013: [If the parameter subscribe is true then IoTHubTransportMqtt_Destroy shall call IoTHubTransportMqtt_Unsubscribe.] */ - if (transportState->subscribed) - { - IoTHubTransportMqtt_Unsubscribe(transportState); - } - (void)mqtt_client_disconnect(transportState->mqttClient); xio_destroy(transportState->xioTransport); transportState->xioTransport = NULL; @@ -1145,7 +1136,7 @@ { PMQTTTRANSPORT_HANDLE_DATA transportState = (PMQTTTRANSPORT_HANDLE_DATA)handle; /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_019: [If parameter handle is NULL then IoTHubTransportMqtt_Unsubscribe shall do nothing.] */ - if (transportState != NULL && transportState->subscribed) + if (transportState != NULL) { /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_020: [IoTHubTransportMqtt_Unsubscribe shall call mqtt_client_unsubscribe to unsubscribe the mqtt message topic.] */ const char* unsubscribe[1];