From be9cc95f23e6a2b6267662a3129e555bf0bf0597 Mon Sep 17 00:00:00 2001 From: Tevin Date: Fri, 18 Jan 2019 23:45:07 +0800 Subject: [PATCH] Initialize request_id to 0 before parsing tokens --- src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c b/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c index b063469..6c5b24c 100644 --- a/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c +++ b/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c @@ -421,6 +421,7 @@ static int parse_device_twin_topic_info(const char* resp_topic, bool* patch_msg, else { result = __FAILURE__; + *request_id = 0; size_t token_count = 0; while (STRING_TOKENIZER_get_next_token(token_handle, token_value, "/") == 0) {