zbx_rtc_notify_finished_sync(proxyconfig_args_in->config_timeout, ZBX_RTC_CONFIG_SYNC_NOTIFY, get_process_type_string(process_type), &rtc);
#include "proxyconfigwrite/proxyconfigwrite.h"
#include "zbxcachehistory.h"
#include "zbxcommshigh.h"
#include "zbx_rtc_constants.h"
#include "zbx_host_constants.h"
static void process_configuration_sync(size_t *data_size, zbx_synced_new_config_t *synced,
const zbx_thread_info_t *thread_info, zbx_thread_proxyconfig_args *args)
struct zbx_json_parse jp, jp_kvs_paths = {0};
char value[16], *error = NULL, *buffer = NULL;
size_t buffer_size, reserved;
zbx_uint64_t config_revision, hostmap_revision;
zbx_proxyconfig_write_status_t status = ZBX_PROXYCONFIG_WRITE_STATUS_DATA;
zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
zbx_dc_get_upstream_revision(&config_revision, &hostmap_revision);
zbx_json_addstring(&j, "request", ZBX_PROTO_VALUE_PROXY_CONFIG, ZBX_JSON_TYPE_STRING);
zbx_json_addstring(&j, "host", args->config_hostname, ZBX_JSON_TYPE_STRING);
zbx_json_addstring(&j, ZBX_PROTO_TAG_VERSION, ZABBIX_VERSION, ZBX_JSON_TYPE_STRING);
zbx_json_addstring(&j, ZBX_PROTO_TAG_SESSION, zbx_dc_get_session_token(), ZBX_JSON_TYPE_STRING);
zbx_json_adduint64(&j, ZBX_PROTO_TAG_CONFIG_REVISION, config_revision);
if (0 != hostmap_revision)
zbx_json_adduint64(&j, ZBX_PROTO_TAG_HOSTMAP_REVISION, hostmap_revision);
if (SUCCEED != zbx_compress(j.buffer, j.buffer_size, &buffer, &buffer_size))