mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
component/bt: Change the queue_data->p_attr->p_value->attr_val.attr_len += queue_data->len code to the if case.
This commit is contained in:
@@ -421,9 +421,9 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
|
|||||||
if (is_prepare_write_valid){
|
if (is_prepare_write_valid){
|
||||||
if((queue_data->p_attr->p_value != NULL) && (queue_data->p_attr->p_value->attr_val.attr_val != NULL)){
|
if((queue_data->p_attr->p_value != NULL) && (queue_data->p_attr->p_value->attr_val.attr_val != NULL)){
|
||||||
memcpy(queue_data->p_attr->p_value->attr_val.attr_val+queue_data->offset, queue_data->value, queue_data->len);
|
memcpy(queue_data->p_attr->p_value->attr_val.attr_val+queue_data->offset, queue_data->value, queue_data->len);
|
||||||
|
//don't forget to increase the attribute value length in the gatts database.
|
||||||
|
queue_data->p_attr->p_value->attr_val.attr_len += queue_data->len;
|
||||||
}
|
}
|
||||||
//don't forget to increase the attribute value length in the gatts database.
|
|
||||||
queue_data->p_attr->p_value->attr_val.attr_len += queue_data->len;
|
|
||||||
}
|
}
|
||||||
osi_free(queue_data);
|
osi_free(queue_data);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user