mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Set addr type when copy from ip4_addr_t (#5583)
This commit is contained in:
		| @@ -34,7 +34,12 @@ struct IPAddress { | ||||
|   } | ||||
|   IPAddress(const ip_addr_t *other_ip) { ip_addr_copy(ip_addr_, *other_ip); } | ||||
|   IPAddress(const std::string &in_address) { ipaddr_aton(in_address.c_str(), &ip_addr_); } | ||||
|   IPAddress(ip4_addr_t *other_ip) { memcpy((void *) &ip_addr_, (void *) other_ip, sizeof(ip4_addr_t)); } | ||||
|   IPAddress(ip4_addr_t *other_ip) { | ||||
|     memcpy((void *) &ip_addr_, (void *) other_ip, sizeof(ip4_addr_t)); | ||||
| #if USE_ESP32 | ||||
|     ip_addr_.type = IPADDR_TYPE_V4; | ||||
| #endif | ||||
|   } | ||||
| #if USE_ARDUINO | ||||
|   IPAddress(const arduino_ns::IPAddress &other_ip) { ip_addr_set_ip4_u32(&ip_addr_, other_ip); } | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user