From 990f8218f442a756ae8d2521bfcdb250b6c9c5e6 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Thu, 21 Oct 2004 14:33:27 +0000 Subject: [PATCH] * modules/control/ntservice.c: fix for --ntservice-extraintf. --- modules/control/ntservice.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c index 656a7c1d64..99c1f57b4a 100755 --- a/modules/control/ntservice.c +++ b/modules/control/ntservice.c @@ -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; } -- 2.11.4.GIT