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 );
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 );
}
}
*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:
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;
}
{
return 1;
}
+
return 0;
}