[vlc-devel] [3.0 BP 1/7] avahi: Explicitly handle AVAHI_BROWSER_REMOVE events
Thomas Guillem
thomas at gllm.fr
Mon Feb 24 13:50:44 CET 2020
From: Stefan BrĂ¼ns <stefan.bruens at rwth-aachen.de>
name is only set for AVAHI_BROWSER_NEW and AVAHI_BROWSER_REMOVE. Explicitly
check for REMOVE instead of deducing the event type from the name being
set.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
(cherry picked from commit aaba1daa2683a403ab4adefffa1abd59f9339d2b)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
modules/services_discovery/avahi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/services_discovery/avahi.c b/modules/services_discovery/avahi.c
index 1457c75a61..f1d4d06fe9 100644
--- a/modules/services_discovery/avahi.c
+++ b/modules/services_discovery/avahi.c
@@ -241,7 +241,7 @@ static void browse_callback(
avahi_strerror( avahi_client_errno( p_sys->client ) ) );
}
}
- else if( name )
+ else if( event == AVAHI_BROWSER_REMOVE && name )
{
/** \todo Store the input id and search it, rather than searching the items */
input_item_t *p_item;
--
2.20.1
More information about the vlc-devel
mailing list