From d404e37449d369fb98a3c58dd0d1cde744387de6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 27 Dec 2025 17:49:25 -1000 Subject: [PATCH] reduce --- esphome/components/api/api_frame_helper.h | 6 +++--- esphome/components/api/api_frame_helper_plaintext.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/api/api_frame_helper.h b/esphome/components/api/api_frame_helper.h index e2c870ff69..edc755f0c7 100644 --- a/esphome/components/api/api_frame_helper.h +++ b/esphome/components/api/api_frame_helper.h @@ -187,9 +187,9 @@ class APIFrameHelper { std::vector reusable_iovs_; std::vector rx_buf_; - // Pointer to client info (4 bytes on 32-bit) - // Note: The pointed-to ClientInfo object must outlive this APIFrameHelper instance. - const ClientInfo *client_info_{nullptr}; + // Pointer to client name buffer (4 bytes on 32-bit) + // Note: The pointed-to buffer must outlive this APIFrameHelper instance. + const char *client_name_{nullptr}; // Group smaller types together uint16_t rx_buf_len_ = 0; diff --git a/esphome/components/api/api_frame_helper_plaintext.h b/esphome/components/api/api_frame_helper_plaintext.h index bba981d26b..e6bb7262f0 100644 --- a/esphome/components/api/api_frame_helper_plaintext.h +++ b/esphome/components/api/api_frame_helper_plaintext.h @@ -7,8 +7,8 @@ namespace esphome::api { class APIPlaintextFrameHelper final : public APIFrameHelper { public: - APIPlaintextFrameHelper(std::unique_ptr socket, const ClientInfo *client_info) - : APIFrameHelper(std::move(socket), client_info) { + APIPlaintextFrameHelper(std::unique_ptr socket, const char *client_name) + : APIFrameHelper(std::move(socket), client_name) { // Plaintext header structure (worst case): // Pos 0: indicator (0x00) // Pos 1-3: payload size varint (up to 3 bytes)