From d8b7980fe4f2c4c06f1a8a44ab8fc993e941140a Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Tue, 15 Mar 2011 17:56:46 +0100 Subject: [PATCH] Do not ask mDNS for IPv6 addresses if RAOP can't use IPv6 --- src/player.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/player.c b/src/player.c index 9b5bc5a2..4a7f3218 100644 --- a/src/player.c +++ b/src/player.c @@ -3721,6 +3721,7 @@ player_init(void) { uint32_t rnd; int raop_v6enabled; + int mdns_flags; int ret; player_exit = 0; @@ -3841,7 +3842,12 @@ player_init(void) goto raop_fail; } - ret = mdns_browse("_raop._tcp", MDNS_WANT_DEFAULT, raop_device_cb); + if (raop_v6enabled) + mdns_flags = MDNS_WANT_V4 | MDNS_WANT_V6 | MDNS_WANT_V6LL; + else + mdns_flags = MDNS_WANT_V4; + + ret = mdns_browse("_raop._tcp", mdns_flags, raop_device_cb); if (ret < 0) { DPRINTF(E_FATAL, L_PLAYER, "Could not add mDNS browser for AirTunes devices\n");