Skip to content

Commit c4f366c

Browse files
committed
fix IPAddress method to work with const address
1 parent 55aaa6f commit c4f366c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/esp32/IPAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ size_t IPAddress::printTo(Print& p) const
374374
return n;
375375
}
376376

377-
void IPAddress::to_ip_addr_t(ip_addr_t* addr){
377+
void IPAddress::to_ip_addr_t(ip_addr_t* addr) const {
378378
if(_type == IPv6){
379379
addr->type = IPADDR_TYPE_V6;
380380
addr->u_addr.ip6.addr[0] = _address.dword[0];

cores/esp32/IPAddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class IPAddress : public Printable {
100100
uint8_t zone() const { return (type() == IPv6)?_zone:0; }
101101

102102
// LwIP conversions
103-
void to_ip_addr_t(ip_addr_t* addr);
103+
void to_ip_addr_t(ip_addr_t* addr) const;
104104
IPAddress& from_ip_addr_t(ip_addr_t* addr);
105105

106106
friend class UDP;

0 commit comments

Comments
 (0)