Skip to content

Commit d762543

Browse files
committed
add dns_no argument to dnsIP() int ESP8266WiFi class
1 parent f6fde0c commit d762543

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ IPAddress ESP8266WiFiClass::gatewayIP()
370370
return IPAddress(ip.gw.addr);
371371
}
372372

373-
IPAddress ESP8266WiFiClass::dnsIP()
373+
IPAddress ESP8266WiFiClass::dnsIP(int dns_no)
374374
{
375-
ip_addr_t dns_ip = dns_getserver(0);
375+
ip_addr_t dns_ip = dns_getserver(dns_no);
376376
return IPAddress(dns_ip.addr);
377377
}
378378

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class ESP8266WiFiClass
173173
*
174174
* return: DNS ip address value
175175
*/
176-
IPAddress dnsIP();
176+
IPAddress dnsIP(int dns_no = 0);
177177

178178
/*
179179
* Return the current SSID associated with the network

0 commit comments

Comments
 (0)