Skip to content

Commit 719e63f

Browse files
fixing dns related functions
1 parent c9ed50c commit 719e63f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/lwIpWrapper/src/CNetIf.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void CLwipIf::clearDnsServers() {
208208
}
209209

210210
IPAddress CLwipIf::getDns(int n) {
211-
ip_addr_t dns = dns_getserver(i);
211+
const ip_addr_t* dns = dns_getserver(n);
212212

213213
return toArduinoIP(dns);
214214
}
@@ -254,7 +254,7 @@ int CLwipIf::getHostByName(const char* aHostname, std::function<void(const IPAdd
254254
case ERR_OK:
255255
// the address was already present in the local cache
256256
cbk(toArduinoIP(addr));
257-
delete ipaddr;
257+
delete addr;
258258
delete dns_cbk;
259259
break;
260260
case ERR_INPROGRESS:
@@ -263,7 +263,7 @@ int CLwipIf::getHostByName(const char* aHostname, std::function<void(const IPAdd
263263
break;
264264
case ERR_ARG: // there are issues in the arguments passed
265265
default:
266-
delete ipaddr;
266+
delete addr;
267267
delete dns_cbk;
268268
res = -1;
269269
}

0 commit comments

Comments
 (0)