mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Fix add multiple services
This commit is contained in:
parent
d45294efff
commit
f34f84be74
@ -146,8 +146,13 @@ void MDNSResponder::addService(char *name, char *proto, uint16_t port){
|
|||||||
os_strcpy(srv->_proto, proto);
|
os_strcpy(srv->_proto, proto);
|
||||||
srv->_port = port;
|
srv->_port = port;
|
||||||
srv->_next = 0;
|
srv->_next = 0;
|
||||||
if(_services) _services->_next = srv;
|
|
||||||
else _services = srv;
|
if(_services == 0) _services = srv;
|
||||||
|
else{
|
||||||
|
MDNSService* servicePtr = _services;
|
||||||
|
while(servicePtr->_next !=0) servicePtr = servicePtr->_next;
|
||||||
|
servicePtr->_next = srv;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t MDNSResponder::_getServicePort(char *name, char *proto){
|
uint16_t MDNSResponder::_getServicePort(char *name, char *proto){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user