mirror of
https://github.com/espressif/esp-rainmaker.git
synced 2026-01-19 01:27:14 +00:00
examples/matter: fixed passing address of local variable
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user