static void zbx_minimal_init_prep_vec_data(zbx_uint64_t lastlogsize, int mtime, zbx_pre_persistent_t *prep_vec_elem)
#include "logfiles/logfiles.h"
#include "zbxcommshigh.h"
extern unsigned char program_type;
extern ZBX_THREAD_LOCAL unsigned char process_type;
extern ZBX_THREAD_LOCAL int server_num, process_num;
extern ZBX_THREAD_LOCAL char *CONFIG_HOSTNAME;
#if defined(ZABBIX_SERVICE)
#elif defined(ZABBIX_DAEMON)
static ZBX_THREAD_LOCAL ZBX_ACTIVE_BUFFER buffer;
static ZBX_THREAD_LOCAL zbx_vector_ptr_t active_metrics;
static ZBX_THREAD_LOCAL zbx_vector_ptr_t regexps;
static ZBX_THREAD_LOCAL char *session_token;
static ZBX_THREAD_LOCAL zbx_uint64_t last_valueid = 0;
static ZBX_THREAD_LOCAL zbx_vector_pre_persistent_t pre_persistent_vec;
static ZBX_THREAD_LOCAL zbx_vector_persistent_inactive_t persistent_inactive_vec;
static volatile sig_atomic_t need_update_userparam;
static void init_active_metrics(void)
zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
zabbix_log(LOG_LEVEL_DEBUG, "buffer: first allocation for %d elements", CONFIG_BUFFER_SIZE);
sz = (size_t)CONFIG_BUFFER_SIZE * sizeof(ZBX_ACTIVE_BUFFER_ELEMENT);
buffer.data = (ZBX_ACTIVE_BUFFER_ELEMENT *)zbx_malloc(buffer.data, sz);
memset(buffer.data, 0, sz);
buffer.lastsent = (int)time(NULL);
zbx_vector_ptr_create(&active_metrics);
zbx_vector_ptr_create(®exps);
zbx_vector_pre_persistent_create(&pre_persistent_vec);
zbx_vector_persistent_inactive_create(&persistent_inactive_vec);
zabbix_log(LOG_LEVEL_DEBUG, "End of %s()", __func__);
static void free_active_metric(ZBX_ACTIVE_METRIC *metric)
zbx_free(metric->key_orig);