Source
if (NULL == (hpi = (zbx_dc_host_proxy_index_t *)zbx_hashset_search(&get_dc_config()->host_proxy_index, &hpi_local)))
/*
** 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 Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
ZBX_PTR_VECTOR_IMPL(pg_proxy_ptr, zbx_pg_proxy_t *)
ZBX_PTR_VECTOR_IMPL(pg_group_ptr, zbx_pg_group_t *)
ZBX_VECTOR_IMPL(pg_host, zbx_pg_host_t)
ZBX_VECTOR_IMPL(pg_host_ref_ptr, zbx_pg_host_ref_t *)
static zbx_hash_t pg_host_ref_hash(const void *d)
{
const zbx_pg_host_ref_t *host = (const zbx_pg_host_ref_t *)d;
return ZBX_DEFAULT_UINT64_HASH_FUNC(&host->host->hostid);
}
static int pg_host_ref_compare(const void *d1, const void *d2)
{
const zbx_pg_host_ref_t *h1 = (const zbx_pg_host_ref_t *)d1;
const zbx_pg_host_ref_t *h2 = (const zbx_pg_host_ref_t *)d2;
ZBX_RETURN_IF_NOT_EQUAL(h1->host->hostid, h2->host->hostid);
return 0;
}
/******************************************************************************
* *
* Purpose: sync proxy groups with configuration cache *
* *
* Parameters: sync - [IN] db synchronization data *
* revision - [IN] current sync revision *
* *
* Comments: The result contains the following fields: *
* 0 - proxy_groupid *
* 1 - failover_delay *
* 2 - min_online *
* *
******************************************************************************/