]> git.sesse.net Git - vlc/commitdiff
* modules/control/ntservice.c: fix for --ntservice-extraintf.
authorGildas Bazin <gbazin@videolan.org>
Thu, 21 Oct 2004 14:33:27 +0000 (14:33 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 21 Oct 2004 14:33:27 +0000 (14:33 +0000)
modules/control/ntservice.c

index 656a7c1d64c3a2dbac668265efe73b656a24a909..99c1f57b4a83443ef094d24f37f813c4baf1e82f 100755 (executable)
@@ -119,6 +119,7 @@ void Close( vlc_object_t *p_this )
  *****************************************************************************/
 static void Run( intf_thread_t *p_intf )
 {
+    intf_thread_t *p_extraintf;
     SERVICE_TABLE_ENTRY dispatchTable[] =
     {
         { VLCSERVICENAME, &ServiceDispatch },
@@ -150,6 +151,15 @@ static void Run( intf_thread_t *p_intf )
 
     free( p_intf->p_sys->psz_service );
 
+    /* Stop and destroy the interfaces we spawned */
+    while( (p_extraintf = vlc_object_find(p_intf, VLC_OBJECT_INTF, FIND_CHILD)))
+    {
+        intf_StopThread( p_extraintf );
+        vlc_object_detach( p_extraintf );
+        vlc_object_release( p_extraintf );
+        intf_Destroy( p_extraintf );
+    }
+
     /* Make sure we exit (In case other interfaces have been spawned) */
     p_intf->p_vlc->b_die = VLC_TRUE;
 }