zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: dc_hostgroups_update_cache                                       *
 *                                                                            *
 * Purpose: updates hostgroup name index and resets nested group lists        *
 *                                                                            *
 ******************************************************************************/
dc_hostgroups_update_cache

Purpose: updates hostgroup name index and resets nested group lists
dc_hostgroups_update_cache Purpose : updates hostgroup name index and resets nested group lists
static void	dc_hostgroups_update_cache(void)
{
	zbx_hashset_iter_t	iter;
	zbx_dc_hostgroup_t	*group;
	zbx_vector_ptr_sort(&config->hostgroups_name, dc_compare_hgroups);
	zbx_hashset_iter_reset(&config->hostgroups, &iter);
	while (NULL != (group = (zbx_dc_hostgroup_t *)zbx_hashset_iter_next(&iter)))
	{
		if (ZBX_DC_HOSTGROUP_FLAGS_NONE != group->flags)
		{
			group->flags = ZBX_DC_HOSTGROUP_FLAGS_NONE;
			zbx_vector_uint64_destroy(&group->nested_groupids);
		}
	}
}
static void dc_hostgroups_update_cache ( void ) { zbx_hashset_iter_t iter ; zbx_dc_hostgroup_t * group ; zbx_vector_ptr_sort ( & config -> hostgroups_name , dc_compare_hgroups ) ; zbx_hashset_iter_reset ( & config -> hostgroups , & iter ) ; while ( NULL != ( group = ( zbx_dc_hostgroup_t * ) zbx_hashset_iter_next ( & iter ) ) ) { if ( ZBX_DC_HOSTGROUP_FLAGS_NONE != group -> flags ) { group -> flags = ZBX_DC_HOSTGROUP_FLAGS_NONE ; zbx_vector_uint64_destroy ( & group -> nested_groupids ) ; } } }
Function: dc_hostgroups_update_cache                                       
                                                                            
 Purpose: updates hostgroup name index and resets nested group lists
Function : dc_hostgroups_update_cache Purpose : updates hostgroup name index and resets nested group lists