Skip to content

Commit 8e6ce68

Browse files
authored
Merge pull request #260 from geky/lwip-fix-get-address
Fixed behaviour of get_ip_address and get_mac_address for LWIPInterface
2 parents 2d165d6 + a506973 commit 8e6ce68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/LWIPInterface/LWIPInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ int LWIPInterface::disconnect()
124124

125125
const char *LWIPInterface::get_ip_address()
126126
{
127-
return ip_addr;
127+
return ip_addr[0] ? ip_addr : 0;
128128
}
129129

130130
const char *LWIPInterface::get_mac_address()
131131
{
132-
return mac_addr;
132+
return mac_addr[0] ? mac_addr : 0;
133133
}
134134

135135
struct lwip_socket {

0 commit comments

Comments
 (0)