mdns: update probe conflict function to provide service in conflict

- Send service slot index to the mdns result function. In case of conflict, the user
  will have to remove the service or rename it.
- Break after hostname conflict in order to managed it first, and managed service name
  conflict after.
- Provide a function to get the TXT userdata for a service (allowing app to match with
  its own data).

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
David Girault
2019-10-15 13:01:46 +02:00
committed by Simon Goldschmidt
parent a2498898b0
commit aa79b90d3c
3 changed files with 28 additions and 14 deletions

View File

@@ -44,9 +44,9 @@ srv_txt(struct mdns_service *service, void *txt_userdata)
#if LWIP_MDNS_RESPONDER
static void
mdns_example_report(struct netif* netif, u8_t result)
mdns_example_report(struct netif* netif, u8_t result, s8_t service)
{
LWIP_PLATFORM_DIAG(("mdns status[netif %d]: %d\n", netif->num, result));
LWIP_PLATFORM_DIAG(("mdns status[netif %d][service %d]: %d\n", netif->num, service, result));
}
#endif