mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 18:41:32 +00:00
[api] Eliminate rx_buf heap churn and release buffers after initial sync (#12133)
This commit is contained in:
@@ -407,8 +407,7 @@ APIError APINoiseFrameHelper::read_packet(ReadPacketBuffer *buffer) {
|
||||
return APIError::BAD_DATA_PACKET;
|
||||
}
|
||||
|
||||
buffer->container = std::move(this->rx_buf_);
|
||||
buffer->data_offset = 4;
|
||||
buffer->data = msg_data + 4; // Skip 4-byte header (type + length)
|
||||
buffer->data_len = data_len;
|
||||
buffer->type = type;
|
||||
return APIError::OK;
|
||||
|
||||
Reference in New Issue
Block a user