mirror of
https://github.com/esphome/esphome.git
synced 2026-02-06 09:32:38 +08:00
[mqtt] resolve warnings related to use of ip.str() (#13719)
This commit is contained in:
@@ -139,7 +139,8 @@ class MQTTBackendESP32 final : public MQTTBackend {
|
||||
this->lwt_retain_ = retain;
|
||||
}
|
||||
void set_server(network::IPAddress ip, uint16_t port) final {
|
||||
this->host_ = ip.str();
|
||||
char ip_buf[network::IP_ADDRESS_BUFFER_SIZE];
|
||||
this->host_ = ip.str_to(ip_buf);
|
||||
this->port_ = port;
|
||||
}
|
||||
void set_server(const char *host, uint16_t port) final {
|
||||
|
||||
Reference in New Issue
Block a user