diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 40c27b224b..7b90d883cc 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -234,7 +234,7 @@ void APIConnection::loop() { this->last_traffic_ = now; } // read a packet - this->read_message(buffer.data_len, buffer.type, buffer.data); + this->read_message_(buffer.data_len, buffer.type, buffer.data); if (this->flags_.remove) return; } diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index 58e0addf3f..5036899bf6 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -49,7 +49,7 @@ class APIConnection final : public APIServerConnectionBase { friend class APIServer; friend class ListEntitiesIterator; APIConnection(std::unique_ptr socket, APIServer *parent); - virtual ~APIConnection(); + ~APIConnection(); void start(); void loop(); @@ -57,7 +57,7 @@ class APIConnection final : public APIServerConnectionBase { protected: // Override read_message here (instead of in APIServerConnectionBase) so the // compiler can devirtualize and inline on_* handler calls within this class. - void read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data); + void read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data); // Auth helpers defined here (not in ProtoService) so the compiler can // devirtualize is_connection_setup()/on_no_setup_connection() calls diff --git a/esphome/components/api/api_pb2_service.cpp b/esphome/components/api/api_pb2_service.cpp index 58af149fda..d86cf912db 100644 --- a/esphome/components/api/api_pb2_service.cpp +++ b/esphome/components/api/api_pb2_service.cpp @@ -21,7 +21,7 @@ void APIServerConnectionBase::log_receive_message_(const LogString *name) { } #endif -void APIConnection::read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) { +void APIConnection::read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) { // Check authentication/connection requirements switch (msg_type) { case HelloRequest::MESSAGE_TYPE: // No setup required diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index ff7ef48a84..a8c6c58da6 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -3055,7 +3055,7 @@ static const char *const TAG = "api.service"; # can devirtualize and inline the on_* handler calls within the same class. # APIConnection declares the override in api_connection.h. - out = "void APIConnection::read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n" + out = "void APIConnection::read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n" # Auth check block before dispatch switch out += " // Check authentication/connection requirements\n"