@@ -246,22 +246,22 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
246246 /* Basic cluster attributes */
247247 if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
248248 zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
249- std::vector<char > m_manufacturer (zbstr->len + 1 );
250- memcpy (m_manufacturer .data (), zbstr->data , zbstr->len );
251- m_manufacturer [zbstr->len ] = ' \0 ' ;
252- log_i (" Peer Manufacturer is \" %s\" " , m_manufacturer );
249+ std::vector<char > zb_manufacturer (zbstr->len + 1 );
250+ memcpy (zb_manufacturer .data (), zbstr->data , zbstr->len );
251+ zb_manufacturer [zbstr->len ] = ' \0 ' ;
252+ log_i (" Peer Manufacturer is \" %s\" " , zb_manufacturer );
253253 free (_read_manufacturer); // Free any previously allocated memory
254- _read_manufacturer = strdup (m_manufacturer .data ()); // Duplicate the information for persistent storage
254+ _read_manufacturer = strdup (zb_manufacturer .data ()); // Duplicate the information for persistent storage
255255 xSemaphoreGive (lock);
256256 }
257257 if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
258258 zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
259- std::vector<char > m_model (zbstr->len + 1 );
260- memcpy (m_model .data (), zbstr->data , zbstr->len );
261- m_model [zbstr->len ] = ' \0 ' ;
262- log_i (" Peer Model is \" %s\" " , m_model );
259+ std::vector<char > zb_model (zbstr->len + 1 );
260+ memcpy (zb_model .data (), zbstr->data , zbstr->len );
261+ zb_model [zbstr->len ] = ' \0 ' ;
262+ log_i (" Peer Model is \" %s\" " , zb_model );
263263 free (_read_model); // Free any previously allocated memory
264- _read_model = strdup (m_model .data ()); // Duplicate the information for persistent storage
264+ _read_model = strdup (zb_model .data ()); // Duplicate the information for persistent storage
265265 xSemaphoreGive (lock);
266266 }
267267}
0 commit comments