1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Wrap ipv6 code a bit more (#4574)

* Wrap ipv6 code a bit more for when ipv6 support should not be compiled in

* More checks

* More uses

* Fix
This commit is contained in:
Jesse Hills
2023-03-22 09:24:14 +13:00
committed by GitHub
parent cd57469e06
commit d42f35de5d
11 changed files with 112 additions and 20 deletions

View File

@@ -65,7 +65,7 @@ void OTAComponent::setup() {
struct sockaddr_storage server;
socklen_t sl = socket::set_sockaddr_any((struct sockaddr *) &server, sizeof(server), htons(this->port_));
socklen_t sl = socket::set_sockaddr_any((struct sockaddr *) &server, sizeof(server), this->port_);
if (sl == 0) {
ESP_LOGW(TAG, "Socket unable to set sockaddr: errno %d", errno);
this->mark_failed();