mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-01 02:03:45 -04:00
[rcp] Fix for RCP devices not getting removed
This commit is contained in:
parent
96cd401852
commit
dab9089f8e
@ -1298,18 +1298,17 @@ rcp_mdns_device_cb(const char *name, const char *type, const char *domain, const
|
|||||||
device->default_format = MEDIA_FORMAT_WAV;
|
device->default_format = MEDIA_FORMAT_WAV;
|
||||||
device->supported_formats = MEDIA_FORMAT_WAV | MEDIA_FORMAT_MP3 | MEDIA_FORMAT_ALAC;
|
device->supported_formats = MEDIA_FORMAT_WAV | MEDIA_FORMAT_MP3 | MEDIA_FORMAT_ALAC;
|
||||||
|
|
||||||
|
// RCP/Roku Soundbridges only support ipv4
|
||||||
|
device->v4_address = safe_strdup(address);
|
||||||
|
device->v4_port = port; // -1 if we are removing
|
||||||
|
|
||||||
if (port < 0 || !address)
|
if (port < 0 || !address)
|
||||||
{
|
{
|
||||||
ret = player_device_remove(device);
|
ret = player_device_remove(device);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// RCP/Roku Soundbridges only support ipv4
|
|
||||||
device->v4_address = strdup(address);
|
|
||||||
device->v4_port = port;
|
|
||||||
|
|
||||||
DPRINTF(E_INFO, L_RCP, "Adding RCP output device '%s' at '%s'\n", name, address);
|
DPRINTF(E_INFO, L_RCP, "Adding RCP output device '%s' at '%s'\n", name, address);
|
||||||
|
|
||||||
ret = player_device_add(device);
|
ret = player_device_add(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user