From 7983357489ab86fd3feac62b2f6ab42ce8899e63 Mon Sep 17 00:00:00 2001 From: Umer Ilyas Date: Thu, 6 Feb 2020 19:37:47 +0500 Subject: [PATCH 1/3] Client: unlock if subscribe message fails to be created Closes https://github.com/espressif/esp-mqtt/issues/150 --- mqtt_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mqtt_client.c b/mqtt_client.c index b50a112..f2f8de0 100644 --- a/mqtt_client.c +++ b/mqtt_client.c @@ -1460,6 +1460,7 @@ int esp_mqtt_client_subscribe(esp_mqtt_client_handle_t client, const char *topic &client->mqtt_state.pending_msg_id); if (client->mqtt_state.outbound_message->length == 0) { ESP_LOGE(TAG, "Subscribe message cannot be created"); + MQTT_API_UNLOCK(client); return -1; } From 3e4f91ae50319bf240c08269d9729a20f7a164af Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 10 Feb 2020 07:58:36 +0100 Subject: [PATCH 2/3] Client: unlock if unsubscribe message fails to be created In a similar way as for the subscribe message --- mqtt_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mqtt_client.c b/mqtt_client.c index f2f8de0..fba72e3 100644 --- a/mqtt_client.c +++ b/mqtt_client.c @@ -1492,6 +1492,7 @@ int esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *top topic, &client->mqtt_state.pending_msg_id); if (client->mqtt_state.outbound_message->length == 0) { + MQTT_API_UNLOCK(client); ESP_LOGE(TAG, "Unubscribe message cannot be created"); return -1; } From a9036b82a4e2cca34335f07bf031c65c8e973d3e Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 10 Feb 2020 07:36:18 +0100 Subject: [PATCH 3/3] CI: make the qemu tests use IDF release branch Building the mqtt against idf release/v4.1 for the qemu tests to avoid potential issues on IDF master with running qemu --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46c8509..0f6602d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ build_and_test_qemu: script: - cit_add_ssh_key "${GITLAB_KEY}" - git clone "${IDF_REPO}" - - $MQTT_PATH/ci/set_idf.sh master + - $MQTT_PATH/ci/set_idf.sh release/v4.1 - cd $IDF_PATH && tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" - $MQTT_PATH/ci/set_mqtt.sh $CI_COMMIT_SHA # build publish stress test