zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: dc_masteritem_remove_depitem                                     *
 *                                                                            *
 * Purpose: remove itemid from master item dependent itemid vector            *
 *                                                                            *
 * Parameters: master_itemid - [IN] the master item identifier                *
 *             dep_itemid    - [IN] the dependent item identifier             *
 *                                                                            *
 ******************************************************************************/
dc_masteritem_remove_depitem

Purpose: remove itemid from master item dependent itemid vector

Parameters: master_itemid - [IN] the master item identifier
dep_itemid    - [IN] the dependent item identifier
dc_masteritem_remove_depitem Purpose : remove itemid from master item dependent itemid vector Parameters : master_itemid - [ IN ] the master item identifier dep_itemid - [ IN ] the dependent item identifier
static void	dc_masteritem_remove_depitem(zbx_uint64_t master_itemid, zbx_uint64_t dep_itemid)
{
	ZBX_DC_MASTERITEM	*masteritem;
	int			index;
	zbx_uint64_pair_t	pair;
	if (NULL == (masteritem = (ZBX_DC_MASTERITEM *)zbx_hashset_search(&config->masteritems, &master_itemid)))
		return;
	pair.first = dep_itemid;
	if (FAIL == (index = zbx_vector_uint64_pair_search(&masteritem->dep_itemids, pair,
			ZBX_DEFAULT_UINT64_COMPARE_FUNC)))
	{
		return;
	}
	zbx_vector_uint64_pair_remove_noorder(&masteritem->dep_itemids, index);
	if (0 == masteritem->dep_itemids.values_num)
	{
		zbx_vector_uint64_pair_destroy(&masteritem->dep_itemids);
		zbx_hashset_remove_direct(&config->masteritems, masteritem);
	}
}
static void dc_masteritem_remove_depitem ( zbx_uint64_t master_itemid , zbx_uint64_t dep_itemid ) { ZBX_DC_MASTERITEM * masteritem ; int index ; zbx_uint64_pair_t pair ; if ( NULL == ( masteritem = ( ZBX_DC_MASTERITEM * ) zbx_hashset_search ( & config -> masteritems , & master_itemid ) ) ) return ; pair . first = dep_itemid ; if ( FAIL == ( index = zbx_vector_uint64_pair_search ( & masteritem -> dep_itemids , pair , ZBX_DEFAULT_UINT64_COMPARE_FUNC ) ) ) { return ; } zbx_vector_uint64_pair_remove_noorder ( & masteritem -> dep_itemids , index ) ; if ( 0 == masteritem -> dep_itemids . values_num ) { zbx_vector_uint64_pair_destroy ( & masteritem -> dep_itemids ) ; zbx_hashset_remove_direct ( & config -> masteritems , masteritem ) ; } }
Function: dc_masteritem_remove_depitem                                     
                                                                            
 Purpose: remove itemid from master item dependent itemid vector            
                                                                            
 Parameters: master_itemid - [IN] the master item identifier                
             dep_itemid    - [IN] the dependent item identifier
Function : dc_masteritem_remove_depitem Purpose : remove itemid from master item dependent itemid vector Parameters : master_itemid - [ IN ] the master item identifier dep_itemid - [ IN ] the dependent item identifier