zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: zbx_dc_reschedule_trigger_timers                                 *
 *                                                                            *
 * Purpose: reschedule trigger timers while locking configuration cache       *
 *                                                                            *
 * Comments: Triggers are unlocked by DCconfig_unlock_triggers()              *
 *                                                                            *
 ******************************************************************************/
zbx_dc_reschedule_trigger_timers

Purpose: reschedule trigger timers while locking configuration cache

Comments: Triggers are unlocked by DCconfig_unlock_triggers()
zbx_dc_reschedule_trigger_timers Purpose : reschedule trigger timers while locking configuration cache Comments : Triggers are unlocked by DCconfig_unlock_triggers ()
void	zbx_dc_reschedule_trigger_timers(zbx_vector_ptr_t *timers, int now)
{
	int	i;
	for (i = 0; i < timers->values_num; i++)
	{
		zbx_trigger_timer_t	*timer = (zbx_trigger_timer_t *)timers->values[i];
		if (0 == timer->exec_ts.sec)
		{
			if (0 != (timer->exec_ts.sec = dc_function_calculate_nextcheck(timer, now, timer->triggerid)))
				timer->eval_ts = timer->exec_ts;
		}
	}
	WRLOCK_CACHE;
	dc_reschedule_trigger_timers(timers);
	UNLOCK_CACHE;
}
void zbx_dc_reschedule_trigger_timers ( zbx_vector_ptr_t * timers , int now ) { int i ; for ( i = 0 ; i < timers -> values_num ; i ++ ) { zbx_trigger_timer_t * timer = ( zbx_trigger_timer_t * ) timers -> values [ i ] ; if ( 0 == timer -> exec_ts . sec ) { if ( 0 != ( timer -> exec_ts . sec = dc_function_calculate_nextcheck ( timer , now , timer -> triggerid ) ) ) timer -> eval_ts = timer -> exec_ts ; } } WRLOCK_CACHE ; dc_reschedule_trigger_timers ( timers ) ; UNLOCK_CACHE ; }
Function: zbx_dc_reschedule_trigger_timers                                 
                                                                            
 Purpose: reschedule trigger timers while locking configuration cache       
                                                                            
 Comments: Triggers are unlocked by DCconfig_unlock_triggers()
Function : zbx_dc_reschedule_trigger_timers Purpose : reschedule trigger timers while locking configuration cache Comments : Triggers are unlocked by DCconfig_unlock_triggers ()
/* calculate new execution/evaluation time for the evaluated triggers */ /* (timers with reset execution time)                                 */