zabbix-agent2/src/libs/zbxdbhigh/proxy.c
/******************************************************************************
 *                                                                            *
 * Function: process_item_value                                               *
 *                                                                            *
 * Purpose: processes item value depending on proxy/flags settings            *
 *                                                                            *
 * Parameters: item    - [IN] the item to process                             *
 *             result  - [IN] the item result                                 *
 *                                                                            *
 * Comments: Values gathered by server are sent to the preprocessing manager, *
 *           while values received from proxy are already preprocessed and    *
 *           must be either directly stored to history cache or sent to lld   *
 *           manager.                                                         *
 *                                                                            *
 ******************************************************************************/
process_item_value

Purpose: processes item value depending on proxy/flags settings

Parameters: item    - [IN] the item to process
result  - [IN] the item result

Comments: Values gathered by server are sent to the preprocessing manager,
while values received from proxy are already preprocessed and
must be either directly stored to history cache or sent to lld
manager.
process_item_value Purpose : processes item value depending on proxy / flags settings Parameters : item - [ IN ] the item to process result - [ IN ] the item result Comments : Values gathered by server are sent to the preprocessing manager while values received from proxy are already preprocessed and must be either directly stored to history cache or sent to lld manager .
static void	process_item_value(const DC_ITEM *item, AGENT_RESULT *result, zbx_timespec_t *ts, int *h_num,
		char *error)
{
	if (0 == item->host.proxy_hostid)
	{
		zbx_preprocess_item_value(item->itemid, item->host.hostid, item->value_type, item->flags, result, ts,
				item->state, error);
		*h_num = 0;
	}
	else
	{
		if (0 != (ZBX_FLAG_DISCOVERY_RULE & item->flags))
		{
			zbx_lld_process_agent_result(item->itemid, item->host.hostid, result, ts, error);
			*h_num = 0;
		}
		else
		{
			dc_add_history(item->itemid, item->value_type, item->flags, result, ts, item->state, error);
			*h_num = 1;
		}
	}
}
static void process_item_value ( const DC_ITEM * item , AGENT_RESULT * result , zbx_timespec_t * ts , int * h_num , char * error ) { if ( 0 == item -> host . proxy_hostid ) { zbx_preprocess_item_value ( item -> itemid , item -> host . hostid , item -> value_type , item -> flags , result , ts , item -> state , error ) ; * h_num = 0 ; } else { if ( 0 != ( ZBX_FLAG_DISCOVERY_RULE & item -> flags ) ) { zbx_lld_process_agent_result ( item -> itemid , item -> host . hostid , result , ts , error ) ; * h_num = 0 ; } else { dc_add_history ( item -> itemid , item -> value_type , item -> flags , result , ts , item -> state , error ) ; * h_num = 1 ; } } }
Function: process_item_value                                               
                                                                            
 Purpose: processes item value depending on proxy/flags settings            
                                                                            
 Parameters: item    - [IN] the item to process                             
             result  - [IN] the item result                                 
                                                                            
 Comments: Values gathered by server are sent to the preprocessing manager, 
           while values received from proxy are already preprocessed and    
           must be either directly stored to history cache or sent to lld   
           manager.
Function : process_item_value Purpose : processes item value depending on proxy / flags settings Parameters : item - [ IN ] the item to process result - [ IN ] the item result Comments : Values gathered by server are sent to the preprocessing manager while values received from proxy are already preprocessed and must be either directly stored to history cache or sent to lld manager .