[vlc-devel] [PATCH 1/4] avahi: Explicitly handle AVAHI_BROWSER_REMOVE events

Stefan BrĂ¼ns stefan.bruens at rwth-aachen.de
Sat Jan 19 22:41:11 CET 2019


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.
---
 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 956835dbc1..1d71cc82d3 100644
--- a/modules/services_discovery/avahi.c
+++ b/modules/services_discovery/avahi.c
@@ -242,7 +242,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