Source
static void zbx_register_history_write_cbs(zbx_module_t *module, ZBX_HISTORY_WRITE_CBS history_write_cbs)
/*
** 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.
**/
static zbx_vector_ptr_t modules;
zbx_history_float_cb_t *history_float_cbs = NULL;
zbx_history_integer_cb_t *history_integer_cbs = NULL;
zbx_history_string_cb_t *history_string_cbs = NULL;
zbx_history_text_cb_t *history_text_cbs = NULL;
zbx_history_log_cb_t *history_log_cbs = NULL;
/******************************************************************************
* *
* Purpose: add items supported by module *
* *
* Parameters: metrics - list of items supported by module *
* error - error buffer *
* max_error_len - error buffer size *
* *
* Return value: SUCCEED - all module items were added or there were none *
* FAIL - otherwise *
* *
******************************************************************************/
static int zbx_register_module_items(ZBX_METRIC *metrics, char *error, size_t max_error_len)
{
int i;
for (i = 0; NULL != metrics[i].key; i++)
{
/* accept only CF_HAVEPARAMS flag from module items */
metrics[i].flags &= CF_HAVEPARAMS;