1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Revert "ESP8266mDNS using the provided IP in the begin method (#2349)"

Manually specifying the AP IP isn't required; the next change will modify
the MDNS code to correctly handle any combination of AP and STA modes, and
correctly respond to requests on all active interfaces.

This reverts commit b682d597c5.
This commit is contained in:
Stephen Warren
2017-01-14 20:42:38 -07:00
committed by Ivan Grokhotkov
parent 0291a6e32a
commit eb1ac103e4
2 changed files with 15 additions and 31 deletions

View File

@ -63,7 +63,9 @@ public:
~MDNSResponder();
bool begin(const char* hostName);
//for compatibility
bool begin(const char* hostName, IPAddress ip, uint32_t ttl=120);
bool begin(const char* hostName, IPAddress ip, uint32_t ttl=120){
return begin(hostName);
}
void update();
void addService(char *service, char *proto, uint16_t port);
@ -114,9 +116,8 @@ private:
bool _waitingForAnswers;
WiFiEventHandler _disconnectedHandler;
WiFiEventHandler _gotIPHandler;
uint32_t _ip;
bool _begin(const char* hostName, uint32_t ip, uint32_t ttl);
uint32_t _getOurIp();
uint16_t _getServicePort(char *service, char *proto);
MDNSTxt * _getServiceTxt(char *name, char *proto);