zabbix-agent2/src/libs/zbxeval/misc.c
/******************************************************************************
 *                                                                            *
 * Function: zbx_eval_validate_replaced_functionids                           *
 *                                                                            *
 * Purpose: validate parsed expression to check if all functionids were       *
 *          replaced                                                          *
 *                                                                            *
 * Parameters: ctx     [IN] the evaluation context                            *
 *             error - [IN] the error message                                 *
 *                                                                            *
 ******************************************************************************/
zbx_eval_validate_replaced_functionids

Purpose: validate parsed expression to check if all functionids were
replaced

Parameters: ctx     [IN] the evaluation context
error - [IN] the error message
zbx_eval_validate_replaced_functionids Purpose : validate parsed expression to check if all functionids were replaced Parameters : ctx [ IN ] the evaluation context error - [ IN ] the error message
int	zbx_eval_validate_replaced_functionids(zbx_eval_context_t *ctx, char **error)
{
	int	i;
	for (i = 0; i < ctx->stack.values_num; i++)
	{
		zbx_eval_token_t	*token = &ctx->stack.values[i];
		if (ZBX_EVAL_TOKEN_FUNCTIONID != token->type)
			continue;
		if (ZBX_MAX_UINT31_1 != token->opt)
		{
			*error = zbx_dsprintf(*error, "non-updated functionid found at \"%s\"",
					ctx->expression + token->loc.l);
			return FAIL;
		}
	}
	return SUCCEED;
}
int zbx_eval_validate_replaced_functionids ( zbx_eval_context_t * ctx , char * * error ) { int i ; for ( i = 0 ; i < ctx -> stack . values_num ; i ++ ) { zbx_eval_token_t * token = & ctx -> stack . values [ i ] ; if ( ZBX_EVAL_TOKEN_FUNCTIONID != token -> type ) continue ; if ( ZBX_MAX_UINT31_1 != token -> opt ) { * error = zbx_dsprintf ( * error , " \" \" " , ctx -> expression + token -> loc . l ) ; return FAIL ; } } return SUCCEED ; }
Function: zbx_eval_validate_replaced_functionids                           
                                                                            
 Purpose: validate parsed expression to check if all functionids were       
          replaced                                                          
                                                                            
 Parameters: ctx     [IN] the evaluation context                            
             error - [IN] the error message
Function : zbx_eval_validate_replaced_functionids Purpose : validate parsed expression to check if all functionids were replaced Parameters : ctx [ IN ] the evaluation context error - [ IN ] the error message