Merge branch 'bugfix/missing_path_field_in_config' into 'master'

Fix: Adds missing field at config struct.

See merge request espressif/esp-mqtt!96
This commit is contained in:
David Čermák
2021-05-26 15:51:45 +00:00
2 changed files with 2 additions and 0 deletions

View File

@@ -202,6 +202,7 @@ typedef struct {
void *ds_data; /*!< carrier of handle for digital signature parameters */
int network_timeout_ms; /*!< Abort network operation if it is not completed after this value, in milliseconds (defaults to 10s) */
bool disable_keepalive; /*!< Set disable_keepalive=true to turn off keep-alive mechanism, false by default (keepalive is active by default). Note: setting the config value `keepalive` to `0` doesn't disable keepalive feature, but uses a default keepalive period */
const char *path; /*!< Path in the URI*/
} esp_mqtt_client_config_t;
/**

View File

@@ -369,6 +369,7 @@ esp_err_t esp_mqtt_set_config(esp_mqtt_client_handle_t client, const esp_mqtt_cl
err = ESP_ERR_NO_MEM;
ESP_MEM_CHECK(TAG, set_if_config(config->host, &client->config->host), goto _mqtt_set_config_failed);
ESP_MEM_CHECK(TAG, set_if_config(config->path, &client->config->path), goto _mqtt_set_config_failed);
ESP_MEM_CHECK(TAG, set_if_config(config->username, &client->connect_info.username), goto _mqtt_set_config_failed);
ESP_MEM_CHECK(TAG, set_if_config(config->password, &client->connect_info.password), goto _mqtt_set_config_failed);