mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[mdns] Remove ipv4/ipv6 argument to mdns_browse
Make sure mdns_browse() always works the same, and follows user config.
This commit is contained in:
@@ -4363,7 +4363,6 @@ static int
|
||||
airplay_init(void)
|
||||
{
|
||||
int v6enabled;
|
||||
int family;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -4412,15 +4411,7 @@ airplay_init(void)
|
||||
goto out_stop_timing;
|
||||
}
|
||||
|
||||
if (v6enabled)
|
||||
v6enabled = !((timing_6svc.fd < 0) || (control_6svc.fd < 0));
|
||||
|
||||
if (v6enabled)
|
||||
family = AF_UNSPEC;
|
||||
else
|
||||
family = AF_INET;
|
||||
|
||||
ret = mdns_browse("_airplay._tcp", family, airplay_device_cb, MDNS_CONNECTION_TEST);
|
||||
ret = mdns_browse("_airplay._tcp", airplay_device_cb, MDNS_CONNECTION_TEST);
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_AIRPLAY, "Could not add mDNS browser for AirPlay devices\n");
|
||||
|
||||
@@ -2445,7 +2445,6 @@ static int
|
||||
cast_init(void)
|
||||
{
|
||||
struct decode_ctx *decode_ctx;
|
||||
int family;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
@@ -2484,12 +2483,7 @@ cast_init(void)
|
||||
goto out_tls_deinit;
|
||||
}
|
||||
|
||||
if (cfg_getbool(cfg_getsec(cfg, "general"), "ipv6"))
|
||||
family = AF_UNSPEC;
|
||||
else
|
||||
family = AF_INET;
|
||||
|
||||
ret = mdns_browse("_googlecast._tcp", family, cast_device_cb, 0);
|
||||
ret = mdns_browse("_googlecast._tcp", cast_device_cb, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_CAST, "Could not add mDNS browser for Chromecast devices\n");
|
||||
|
||||
@@ -4815,7 +4815,6 @@ raop_init(void)
|
||||
char *ptr;
|
||||
gpg_error_t gc_err;
|
||||
int v6enabled;
|
||||
int family;
|
||||
int ret;
|
||||
|
||||
timing_4svc.fd = -1;
|
||||
@@ -4900,15 +4899,7 @@ raop_init(void)
|
||||
goto out_stop_timing;
|
||||
}
|
||||
|
||||
if (v6enabled)
|
||||
v6enabled = !((timing_6svc.fd < 0) || (control_6svc.fd < 0));
|
||||
|
||||
if (v6enabled)
|
||||
family = AF_UNSPEC;
|
||||
else
|
||||
family = AF_INET;
|
||||
|
||||
ret = mdns_browse("_raop._tcp", family, raop_device_cb, MDNS_CONNECTION_TEST);
|
||||
ret = mdns_browse("_raop._tcp", raop_device_cb, MDNS_CONNECTION_TEST);
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_RAOP, "Could not add mDNS browser for AirPlay devices\n");
|
||||
|
||||
Reference in New Issue
Block a user