int zbx_discovery_async_check_http(CURLM *curl_mhandle, const char *config_source_ip, int timeout, const char *ip,
#include "zbx_discoverer_constants.h"
static int http_task_process(short event, void *data, int *fd, struct evutil_addrinfo **current_ai,
const char *addr, char *dnserr, struct event *timeout_event)
int task_ret = ZBX_ASYNC_TASK_STOP;
zbx_discovery_async_http_context_t *http_context = (zbx_discovery_async_http_context_t *)data;
ZBX_UNUSED(timeout_event);
if (ZBX_ASYNC_HTTP_STEP_RDNS == http_context->step)
http_context->reverse_dns = zbx_strdup(NULL, addr);
if (0 != (event & EV_TIMEOUT))
if (ZABBIX_ASYNC_RESOLVE_REVERSE_DNS_YES == http_context->resolve_reverse_dns)
task_ret = ZBX_ASYNC_TASK_RESOLVE_REVERSE;
http_context->step = ZBX_ASYNC_HTTP_STEP_RDNS;
void process_http_response(CURL *easy_handle, CURLcode err, void *arg)
zbx_discovery_async_http_context_t *http_context;
discovery_poller_config_t *poller_config = (discovery_poller_config_t *)arg;
if (CURLE_OK != (err_info = curl_easy_getinfo(easy_handle, CURLINFO_PRIVATE, &http_context)))
zabbix_log(LOG_LEVEL_CRIT, "Cannot get pointer to private data: %s", curl_easy_strerror(err_info));
THIS_SHOULD_NEVER_HAPPEN;