examples/matter: fixed passing address of local variable

This commit is contained in:
Sayon Deep
2024-07-03 17:29:46 +05:30
committed by esp
parent a443f7ff66
commit 585c834c11
2 changed files with 3 additions and 3 deletions

View File

@@ -526,7 +526,7 @@ static void parse_cb_response(cb_data* _data)
ep_cluster* curr_cluster = node_ptr->get_cluster_ptr[_data->attr_path.mClusterId];
cl_attribute* nattribute = new cl_attribute(_data->attr_path.mAttributeId,&esp_val);
cl_attribute* nattribute = new cl_attribute(_data->attr_path.mAttributeId,esp_val);
curr_cluster->get_attribute_ptr[_data->attr_path.mAttributeId] = nattribute;

View File

@@ -23,10 +23,10 @@ typedef struct attributes
esp_matter_attr_val_t esp_value;
attributes(uint32_t attributeid, esp_matter_attr_val_t* esp_val)
attributes(uint32_t attributeid, esp_matter_attr_val_t& esp_val)
{
this->attribute_id = attributeid;
this->esp_value = *esp_val;
this->esp_value = *(&esp_val);
}
}cl_attribute;