vlc/vlc-3.0 | branch: master | Stefan Brüns <[email protected]> | 
Sat Jan 19 22:41:11 2019 +0100| [1dd9ff0a524595aac4853e60b03e7f3b8604bf5e] | 
committer: Thomas Guillem

avahi: Explicitly handle AVAHI_BROWSER_REMOVE events

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 <[email protected]>
(cherry picked from commit aaba1daa2683a403ab4adefffa1abd59f9339d2b)
Signed-off-by: Thomas Guillem <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1dd9ff0a524595aac4853e60b03e7f3b8604bf5e
---

 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;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to