Commit d84370a8 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix VLM scheduling.

parent 2fcddc86
......@@ -147,7 +147,7 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
vlc_mutex_init( &p_vlm->lock );
vlc_mutex_init( &p_vlm->lock_manage );
vlc_cond_init( &p_vlm->wait_manage );
vlc_cond_init_daytime( &p_vlm->wait_manage );
p_vlm->i_id = 1;
TAB_INIT( p_vlm->i_media, p_vlm->media );
TAB_INIT( p_vlm->i_schedule, p_vlm->schedule );
......@@ -375,7 +375,7 @@ static void* Manage( void* p_object )
vlc_mutex_lock( &vlm->lock_manage );
if( i_nextschedule )
vlc_cond_timedwait( &vlm->wait_manage, &vlm->lock_manage, i_nextschedule-mdate() );
vlc_cond_timedwait( &vlm->wait_manage, &vlm->lock_manage, i_nextschedule );
else
vlc_cond_wait( &vlm->wait_manage, &vlm->lock_manage );
vlc_mutex_unlock( &vlm->lock_manage );
......
......@@ -664,6 +664,11 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
}
}
*pp_status = vlm_MessageSimpleNew( psz_cmd );
vlc_mutex_lock( &p_vlm->lock_manage );
vlc_cond_signal( &p_vlm->wait_manage );
vlc_mutex_unlock( &p_vlm->lock_manage );
return VLC_SUCCESS;
error:
......@@ -996,10 +1001,6 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
TAB_APPEND( vlm->i_schedule, vlm->schedule, p_sched );
vlc_mutex_lock( &vlm->lock_manage );
vlc_cond_signal( &vlm->wait_manage );
vlc_mutex_unlock( &vlm->lock_manage );
return p_sched;
}
......@@ -1217,6 +1218,7 @@ static int vlm_ScheduleSetup( vlm_schedule_sys_t *schedule, const char *psz_cmd,
{
return 1;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment