Source
umc = steps.values[i]->cache = um_cache_sync(umc, 0, &gmacros, &hmacros, &htmpls, &config_vault,
/*
** 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.
**/
typedef struct
{
zbx_uint32_t refs;
zbx_um_mock_cache_t mock_cache;
zbx_um_cache_t *cache;
}
zbx_mock_step_t;
ZBX_PTR_VECTOR_DECL(mock_step, zbx_mock_step_t *)
ZBX_PTR_VECTOR_IMPL(mock_step, zbx_mock_step_t *)
static void mock_step_free(zbx_mock_step_t *step)
{
zbx_uint32_t i;
um_mock_cache_clear(&step->mock_cache);
for (i = 0; i < step->refs; i++)
um_cache_release(step->cache);
zbx_free(step);
}
static void dbsync_check_empty(const char *entity, zbx_dbsync_t *sync)
{
unsigned char tag;
zbx_uint64_t rowid;
char **row;
char *errors[] = {"unknown", "added", "updated", "removed"};
if (SUCCEED == zbx_dbsync_next(sync, &rowid, &row, &tag))
{
char *msg = NULL;
size_t msg_alloc = 0, msg_offset = 0;