Skip to content

Commit

Permalink
Merge branch 'bugfix/build_fail_if_claiming_enabled' into 'master'
Browse files Browse the repository at this point in the history
rmaker_core: Fixes build failure when claim config is disabled.

See merge request app-frameworks/esp-rainmaker!191
  • Loading branch information
shahpiyushv committed Oct 19, 2020
2 parents d3f0e64 + 4517665 commit f1b82c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/esp_rainmaker/src/core/esp_rmaker_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ static esp_err_t esp_rmaker_init(const esp_rmaker_config_t *config, bool use_cla
ESP_LOGE(TAG, "Failed to initialise MQTT Config. Please perform \"claiming\" using RainMaker CLI.");
return ESP_FAIL;
} else {
if (!esp_rmaker_priv_data->need_claim) {
#ifdef ESP_RMAKER_CLAIM_ENABLED
if (!esp_rmaker_priv_data->need_claim)
#endif /* ESP_RMAKER_CLAIM_ENABLED */
{
if (esp_rmaker_mqtt_init(esp_rmaker_priv_data->mqtt_config) != ESP_OK) {
esp_rmaker_deinit_priv_data(esp_rmaker_priv_data);
esp_rmaker_priv_data = NULL;
Expand Down

0 comments on commit f1b82c7

Please sign in to comment.