zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: DCtouch_interfaces_availability                                  *
 *                                                                            *
 * Purpose: sets availability timestamp to current time for the specified     *
 *          interfaces                                                        *
 *                                                                            *
 * Parameters: interfaceids - [IN] the interfaces identifiers                 *
 *                                                                            *
 ******************************************************************************/
DCtouch_interfaces_availability

Purpose: sets availability timestamp to current time for the specified
interfaces

Parameters: interfaceids - [IN] the interfaces identifiers
DCtouch_interfaces_availability Purpose : sets availability timestamp to current time for the specified interfaces Parameters : interfaceids - [ IN ] the interfaces identifiers
void	DCtouch_interfaces_availability(const zbx_vector_uint64_t *interfaceids)
{
	ZBX_DC_INTERFACE	*dc_interface;
	int			i, now;
	zabbix_log(LOG_LEVEL_DEBUG, "In %s() interfaceids:%d", __func__, interfaceids->values_num);
	now = time(NULL);
	WRLOCK_CACHE;
	for (i = 0; i < interfaceids->values_num; i++)
	{
		if (NULL != (dc_interface = zbx_hashset_search(&config->interfaces, &interfaceids->values[i])))
			dc_interface->availability_ts = now;
	}
	UNLOCK_CACHE;
	zabbix_log(LOG_LEVEL_DEBUG, "End of %s()", __func__);
}
void DCtouch_interfaces_availability ( const zbx_vector_uint64_t * interfaceids ) { ZBX_DC_INTERFACE * dc_interface ; int i , now ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ , interfaceids -> values_num ) ; now = time ( NULL ) ; WRLOCK_CACHE ; for ( i = 0 ; i < interfaceids -> values_num ; i ++ ) { if ( NULL != ( dc_interface = zbx_hashset_search ( & config -> interfaces , & interfaceids -> values [ i ] ) ) ) dc_interface -> availability_ts = now ; } UNLOCK_CACHE ; zabbix_log ( LOG_LEVEL_DEBUG , " " , __func__ ) ; }
Function: DCtouch_interfaces_availability                                  
                                                                            
 Purpose: sets availability timestamp to current time for the specified     
          interfaces                                                        
                                                                            
 Parameters: interfaceids - [IN] the interfaces identifiers
Function : DCtouch_interfaces_availability Purpose : sets availability timestamp to current time for the specified interfaces Parameters : interfaceids - [ IN ] the interfaces identifiers