mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 23:55:57 -05:00
Do not add AirTunes devices that don't support AirTunes v2
Filter based on the tp field of the mDNS TXT record.
This commit is contained in:
parent
59c464e409
commit
47bd255ffc
28
src/player.c
28
src/player.c
@ -2849,6 +2849,34 @@ raop_device_cb(const char *name, const char *type, const char *domain, const cha
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
p = avahi_string_list_find(txt, "tp");
|
||||||
|
if (!p)
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_PLAYER, "AirTunes %s: no tp field in TXT record!\n", name);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
avahi_string_list_get_pair(p, &key, &val, &valsz);
|
||||||
|
avahi_free(key);
|
||||||
|
if (!val)
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_PLAYER, "AirTunes %s: tp has no value\n", name);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strstr(val, "UDP"))
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_PLAYER, "AirTunes %s: device does not support AirTunes v2 (tp=%s), discarding\n", name, val);
|
||||||
|
|
||||||
|
avahi_free(val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
avahi_free(val);
|
||||||
|
val = NULL;
|
||||||
|
|
||||||
p = avahi_string_list_find(txt, "pw");
|
p = avahi_string_list_find(txt, "pw");
|
||||||
if (!p)
|
if (!p)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user