mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Fix typo in MDNS multi-interface advertising code
MDNSResponder::advertiseServices() was transmitting all service adverts
on the same interface (AP) rather than once on STA and once on AP. Fix
this simple mistake.
With this change, both "ping esp8266.local" and "avahi-browse -a" see
the ESP8266 from a test Linux PC, on both AP and STA interfaces (where
applicable), with the ESP8266 running mDNS_Web_Server.ino modified for
each of AP-only, STA-only and AP+STA modes.
Note that no attempt has been made to make MDNSResponder::queryService()
operate correctly with multiple interfaces, either in this commit or the
commit this commit fixes.
Fixes: a546d64e07
("ESP8266mDNS: support AP and STA interfaces at once")
Fixes #3101
This commit is contained in:
committed by
Ivan Grokhotkov
parent
c5c138ec5a
commit
4cf7909df9
@ -888,7 +888,7 @@ size_t MDNSResponder::advertiseServices(){
|
|||||||
if (ip)
|
if (ip)
|
||||||
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);
|
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);
|
||||||
|
|
||||||
wifi_get_ip_info(SOFTAP_IF, &ip_info);
|
wifi_get_ip_info(STATION_IF, &ip_info);
|
||||||
ip = ip_info.ip.addr;
|
ip = ip_info.ip.addr;
|
||||||
if (ip)
|
if (ip)
|
||||||
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);
|
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);
|
||||||
|
Reference in New Issue
Block a user