Source
if (FAIL == zbx_json_value_by_name_dyn(&jp_data, ZBX_PROTO_TAG_VALUE, &values[*values_num], &size, NULL))
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
extern int CONFIG_DOUBLE_PRECISION;
/******************************************************************************
* *
* Purpose: parses preprocessing test request *
* *
* Parameters: jp - [IN] the request *
* values - [OUT] the values to test optional *
* (history + current) *
* ts - [OUT] value timestamps *
* values_num - [OUT] the number of values *
* value_type - [OUT] the value type *
* steps - [OUT] the preprocessing steps *
* single - [OUT] is preproc step single *
* state - [OUT] the item state *
* bypass_first - [OUT] the flag to bypass first step *
* error - [OUT] the error message *
* *
* Return value: SUCCEED - the request was parsed successfully *
* FAIL - otherwise *
* *
******************************************************************************/
static int trapper_parse_preproc_test(const struct zbx_json_parse *jp, char **values, zbx_timespec_t *ts,
int *values_num, unsigned char *value_type, zbx_vector_pp_step_ptr_t *steps, int *single, int *state,
int *bypass_first, char **error)
{
char buffer[MAX_STRING_LEN], *step_params = NULL, *error_handler_params = NULL;
const char *ptr;
zbx_user_t user;
int ret = FAIL;
struct zbx_json_parse jp_data, jp_history, jp_steps, jp_step;
size_t size;
zbx_timespec_t ts_now;
zbx_user_init(&user);