Skip to content

Commit 282ccc5

Browse files
committed
fix(zigbee): Add check when adding a OTA cluster
1 parent 51f1454 commit 282ccc5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libraries/Zigbee/src/ZigbeeEP.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,11 @@ bool ZigbeeEP::addOTAClient(
492492
log_e("Failed to add OTA server endpoint: 0x%x: %s", ret, esp_err_to_name(ret));
493493
return false;
494494
}
495-
esp_zb_cluster_list_add_ota_cluster(_cluster_list, ota_cluster, ESP_ZB_ZCL_CLUSTER_CLIENT_ROLE);
495+
ret = esp_zb_cluster_list_add_ota_cluster(_cluster_list, ota_cluster, ESP_ZB_ZCL_CLUSTER_CLIENT_ROLE);
496+
if (ret != ESP_OK) {
497+
log_e("Failed to add OTA cluster: 0x%x: %s", ret, esp_err_to_name(ret));
498+
return false;
499+
}
496500
return true;
497501
}
498502

0 commit comments

Comments
 (0)