zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: DCconfig_get_proxypoller_nextcheck                               *
 *                                                                            *
 * Purpose: Get nextcheck for passive proxies                                 *
 *                                                                            *
 * Return value: nextcheck or FAIL if no passive proxies in queue             *
 *                                                                            *
 * Author: Alexander Vladishev                                                *
 *                                                                            *
 ******************************************************************************/
DCconfig_get_proxypoller_nextcheck

Purpose: Get nextcheck for passive proxies

Return value: nextcheck or FAIL if no passive proxies in queue

Author: Alexander Vladishev
DCconfig_get_proxypoller_nextcheck Purpose : Get nextcheck for passive proxies Return value : nextcheck or FAIL if no passive proxies in queue Author : Alexander Vladishev
int	DCconfig_get_proxypoller_nextcheck(void)
{
	int			nextcheck;
	zbx_binary_heap_t	*queue;
	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
	queue = &config->pqueue;
	RDLOCK_CACHE;
	if (FAIL == zbx_binary_heap_empty(queue))
	{
		const zbx_binary_heap_elem_t	*min;
		const ZBX_DC_PROXY		*dc_proxy;
		min = zbx_binary_heap_find_min(queue);
		dc_proxy = (const ZBX_DC_PROXY *)min->data;
		nextcheck = dc_proxy->nextcheck;
	}
	else
		nextcheck = FAIL;
	UNLOCK_CACHE;
	zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%d", __func__, nextcheck);
	return nextcheck;
}
int DCconfig_get_proxypoller_nextcheck ( void ) { int nextcheck ; zbx_binary_heap_t * queue ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ ) ; queue = & config -> pqueue ; RDLOCK_CACHE ; if ( FAIL == zbx_binary_heap_empty ( queue ) ) { const zbx_binary_heap_elem_t * min ; const ZBX_DC_PROXY * dc_proxy ; min = zbx_binary_heap_find_min ( queue ) ; dc_proxy = ( const ZBX_DC_PROXY * ) min -> data ; nextcheck = dc_proxy -> nextcheck ; } else nextcheck = FAIL ; UNLOCK_CACHE ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ , nextcheck ) ; return nextcheck ; }
Function: DCconfig_get_proxypoller_nextcheck                               
                                                                            
 Purpose: Get nextcheck for passive proxies                                 
                                                                            
 Return value: nextcheck or FAIL if no passive proxies in queue             
                                                                            
 Author: Alexander Vladishev
Function : DCconfig_get_proxypoller_nextcheck Purpose : Get nextcheck for passive proxies Return value : nextcheck or FAIL if no passive proxies in queue Author : Alexander Vladishev