Skip to content

Commit 4517665

Browse files
committed
rmaker_core: Fixes build failure when claim config is disabled.
1 parent d3f0e64 commit 4517665

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: components/esp_rainmaker/src/core/esp_rmaker_core.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ static esp_err_t esp_rmaker_init(const esp_rmaker_config_t *config, bool use_cla
264264
ESP_LOGE(TAG, "Failed to initialise MQTT Config. Please perform \"claiming\" using RainMaker CLI.");
265265
return ESP_FAIL;
266266
} else {
267-
if (!esp_rmaker_priv_data->need_claim) {
267+
#ifdef ESP_RMAKER_CLAIM_ENABLED
268+
if (!esp_rmaker_priv_data->need_claim)
269+
#endif /* ESP_RMAKER_CLAIM_ENABLED */
270+
{
268271
if (esp_rmaker_mqtt_init(esp_rmaker_priv_data->mqtt_config) != ESP_OK) {
269272
esp_rmaker_deinit_priv_data(esp_rmaker_priv_data);
270273
esp_rmaker_priv_data = NULL;

0 commit comments

Comments
 (0)