Source
configured_tls_connect_mode, CONFIG_PROXYCONFIG_RETRY, LOG_LEVEL_WARNING)) /* retry till have a connection */
/*
** 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.
**/
/* seconds */
extern ZBX_THREAD_LOCAL unsigned char process_type;
extern unsigned char program_type;
extern ZBX_THREAD_LOCAL int server_num, process_num;
extern zbx_vector_ptr_t zbx_addrs;
extern char *CONFIG_HOSTNAME;
extern char *CONFIG_SOURCE_IP;
extern unsigned int configured_tls_connect_mode;
static void process_configuration_sync(size_t *data_size)
{
zbx_socket_t sock;
struct zbx_json_parse jp, jp_kvs_paths = {0};
char value[16], *error = NULL, *buffer = NULL;
size_t buffer_size, reserved;
struct zbx_json j;
int ret = FAIL;
zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
/* reset the performance metric */
*data_size = 0;
zbx_json_init(&j, 128);
zbx_json_addstring(&j, "request", ZBX_PROTO_VALUE_PROXY_CONFIG, ZBX_JSON_TYPE_STRING);
zbx_json_addstring(&j, "host", CONFIG_HOSTNAME, ZBX_JSON_TYPE_STRING);
zbx_json_addstring(&j, ZBX_PROTO_TAG_VERSION, ZABBIX_VERSION, ZBX_JSON_TYPE_STRING);
if (SUCCEED != zbx_compress(j.buffer, j.buffer_size, &buffer, &buffer_size))
{
zabbix_log(LOG_LEVEL_ERR,"cannot compress data: %s", zbx_compress_strerror());