Source
if (FAIL == zbx_is_export_enabled(ZBX_FLAG_EXPTYPE_EVENTS | ZBX_FLAG_EXPTYPE_TRENDS | ZBX_FLAG_EXPTYPE_HISTORY))
/*
** Zabbix
** Copyright (C) 2001-2025 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 char *CONFIG_EXPORT_DIR;
extern char *CONFIG_EXPORT_TYPE;
extern zbx_uint64_t CONFIG_EXPORT_FILE_SIZE;
typedef struct
{
char *name;
FILE *file;
int missing;
}
zbx_export_file_t;
static zbx_export_file_t *history_file;
static zbx_export_file_t *trends_file;
static zbx_export_file_t *problems_file;
static char *export_dir;
/******************************************************************************
* *
* Purpose: validate export type *
* *
* Parameters: export_type - [in] list of export types *
* export_mask - [out] export types mask (if SUCCEED) *
* *
* Return value: SUCCEED - valid configuration *
* FAIL - otherwise *
* *
******************************************************************************/
int zbx_validate_export_type(char *export_type, uint32_t *export_mask)
{
int ret = SUCCEED;
char *start = export_type;
uint32_t mask;
char *types[] = {
ZBX_OPTION_EXPTYPE_EVENTS,