From: Gildas Bazin Date: Thu, 21 Oct 2004 14:33:27 +0000 (+0000) Subject: * modules/control/ntservice.c: fix for --ntservice-extraintf. X-Git-Tag: 0.8.0~86 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=990f8218f442a756ae8d2521bfcdb250b6c9c5e6;p=vlc * modules/control/ntservice.c: fix for --ntservice-extraintf. --- 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; }