zbx_async_poller_add_task(base, dnsbase, agent_context->item.interface.addr, agent_context, item->timeout + 1,
#include "async_poller.h"
#include "zbxcacheconfig.h"
#include "zbxcachehistory.h"
#include "zbx_item_constants.h"
static const char *get_agent_step_string(zbx_zabbix_agent_step_t step)
case ZABBIX_AGENT_STEP_CONNECT_INIT:
case ZABBIX_AGENT_STEP_CONNECT_WAIT:
case ZABBIX_AGENT_STEP_TLS_WAIT:
case ZABBIX_AGENT_STEP_SEND:
case ZABBIX_AGENT_STEP_RECV:
case ZABBIX_AGENT_STEP_RECV_CLOSE:
return "receive close notify";
static int agent_task_process(short event, void *data, int *fd, const char *addr, char *dnserr,
struct event *timeout_event)
zbx_agent_context *agent_context = (zbx_agent_context *)data;
zbx_async_task_state_t state = ZBX_ASYNC_TASK_STOP;
zbx_poller_config_t *poller_config = (zbx_poller_config_t *)agent_context->arg_action;
socklen_t optlen = sizeof(int);
ZBX_UNUSED(timeout_event);
zabbix_log(LOG_LEVEL_DEBUG, "In %s() step '%s' event:%d itemid:" ZBX_FS_UI64 " addr:%s", __func__,
get_agent_step_string(agent_context->step), event, agent_context->item.itemid,