From: Marco Bettini Date: Tue, 4 Oct 2022 15:02:06 +0000 (+0000) Subject: lib-master: Replace i_() with e_() X-Git-Tag: 2.4.0~3526 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c1a00c69fa7b285b971ba7f40bc97d2ae94c747;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Replace i_() with e_() --- diff --git a/src/lib-master/master-service-haproxy.c b/src/lib-master/master-service-haproxy.c index 68792c03b0..bc9dcb9471 100644 --- a/src/lib-master/master-service-haproxy.c +++ b/src/lib-master/master-service-haproxy.c @@ -99,6 +99,7 @@ struct master_service_haproxy_conn { struct master_service_connection conn; pool_t pool; + struct event *event; struct master_service_haproxy_conn *prev, *next; @@ -117,6 +118,7 @@ master_service_haproxy_conn_free(struct master_service_haproxy_conn *hpconn) io_remove(&hpconn->io); timeout_remove(&hpconn->to); + event_unref(&hpconn->event); pool_unref(&hpconn->pool); } @@ -143,7 +145,7 @@ master_service_haproxy_conn_success(struct master_service_haproxy_conn *hpconn) static void master_service_haproxy_timeout(struct master_service_haproxy_conn *hpconn) { - i_error("haproxy: Client timed out (rip=%s)", + e_error(hpconn->event, "Client timed out (rip=%s)", net_ip2addr(&hpconn->conn.remote_ip)); master_service_haproxy_conn_failure(hpconn); } @@ -310,7 +312,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) /* see if there is a HAPROXY protocol command waiting */ if ((ret = master_service_haproxy_recv(fd, rbuf, sizeof(*buf), MSG_PEEK))<=0) { if (ret < 0) - i_info("haproxy: Client disconnected (rip=%s): %m", + e_info(hpconn->event, "Client disconnected (rip=%s): %m", net_ip2addr(real_remote_ip)); return ret; /* see if there is a haproxy command, 8 is used later on as well */ @@ -321,27 +323,30 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) memcmp(buf->v2.hdr.sig, haproxy_v2sig, sizeof(haproxy_v2sig)) == 0) { want = ntohs(buf->v2.hdr.len) + sizeof(buf->v2.hdr); if (want > sizeof(rbuf_full)) { - i_error("haproxy: Client disconnected: Too long header (rip=%s)", + e_error(hpconn->event, + "Client disconnected: Too long header (rip=%s)", net_ip2addr(real_remote_ip)); return -1; } if ((ret = master_service_haproxy_recv(fd, rbuf, want, MSG_WAITALL))<=0) { if (ret < 0) - i_info("haproxy: Client disconnected (rip=%s): %m", + e_info(hpconn->event, + "Client disconnected (rip=%s): %m", net_ip2addr(real_remote_ip)); return ret; } if (ret != (ssize_t)want) { - i_info("haproxy: Client disconnected: Failed to read full header (rip=%s)", + e_info(hpconn->event, + "Client disconnected: Failed to read full header (rip=%s)", net_ip2addr(real_remote_ip)); return -1; } version = HAPROXY_VERSION_2; } else { /* it wasn't haproxy data */ - i_error("haproxy: Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Failed to read valid HAproxy data (rip=%s)", net_ip2addr(real_remote_ip)); return -1; @@ -362,7 +367,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) i_assert(ret >= (ssize_t)sizeof(buf->v2.hdr)); if ((hdr->ver_cmd & 0xf0) != 0x20) { - i_error("haproxy: Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Unsupported protocol version (version=%02x, rip=%s)", (hdr->ver_cmd & 0xf0) >> 4, net_ip2addr(real_remote_ip)); @@ -375,8 +380,10 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) because TLVs begin after that. */ i = 0; + event_set_append_log_prefix(hpconn->event, "haproxy(v2): "); + if (ret < (ssize_t)size) { - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Protocol payload length does not match header " "(got=%zu, expect=%zu, rip=%s)", (size_t)ret, size, net_ip2addr(real_remote_ip)); @@ -388,14 +395,14 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) switch (hdr->ver_cmd & 0x0f) { case HAPROXY_CMD_LOCAL: /* keep local connection address for LOCAL */ - /*i_debug("haproxy(v2): Local connection (rip=%s)", + /*i_debug("Local connection (rip=%s)", net_ip2addr(real_remote_ip));*/ i = size; /* we should skip all the remaining data which can be present in PROXY protocol */ break; case HAPROXY_CMD_PROXY: if ((hdr->fam & 0x0f) != HAPROXY_SOCK_STREAM) { /* UDP makes no sense currently */ - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Not using TCP (type=%02x, rip=%s)", (hdr->fam & 0x0f), net_ip2addr(real_remote_ip)); return -1; @@ -404,7 +411,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) case HAPROXY_AF_INET: /* IPv4 */ if (hdr_len < sizeof(data->addr.ip4)) { - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "IPv4 data is incomplete (rip=%s)", net_ip2addr(real_remote_ip)); return -1; @@ -420,7 +427,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) case HAPROXY_AF_INET6: /* IPv6 */ if (hdr_len < sizeof(data->addr.ip6)) { - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "IPv6 data is incomplete (rip=%s)", net_ip2addr(real_remote_ip)); return -1; @@ -436,13 +443,13 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) case HAPROXY_AF_UNSPEC: case HAPROXY_AF_UNIX: /* unsupported; ignored */ - i_error("haproxy(v2): Unsupported address family " + e_error(hpconn->event, "Unsupported address family " "(family=%02x, rip=%s)", (hdr->fam & 0xf0) >> 4, net_ip2addr(real_remote_ip)); break; default: /* unsupported; error */ - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Unknown address family " "(family=%02x, rip=%s)", (hdr->fam & 0xf0) >> 4, net_ip2addr(real_remote_ip)); @@ -450,7 +457,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) } break; default: - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Invalid command (cmd=%02x, rip=%s)", (hdr->ver_cmd & 0x0f), net_ip2addr(real_remote_ip)); @@ -458,13 +465,13 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) } if (i > size) { - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Invalid header size (size=%zu, tlv offset=%zu)", size, i); return -1; /* not a supported command */ } if (master_service_haproxy_parse_tlv(hpconn, PTR_OFFSET(rbuf, i), size-i, &error) < 0) { - i_error("haproxy(v2): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Invalid TLV: %s (cmd=%02x, rip=%s)", error, (hdr->ver_cmd & 0x0f), @@ -491,9 +498,12 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) i_assert(strcmp(*fields, "PROXY") == 0); fields++; + event_drop_parent_log_prefixes(hpconn->event, 1); + event_set_append_log_prefix(hpconn->event, "haproxy(v1): "); + /* protocol */ if (*fields == NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Field for proxied protocol is missing " "(rip=%s)", net_ip2addr(real_remote_ip)); return -1; @@ -505,7 +515,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) } else if (strcmp(*fields, "UNKNOWN") == 0) { family = 0; } else { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Unknown proxied protocol " "(protocol=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -516,14 +526,14 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) if (family != 0) { /* remote address */ if (*fields == NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Field for proxied remote address is missing " "(rip=%s)", net_ip2addr(real_remote_ip)); return -1; } if (net_addr2ip(*fields, &remote_ip) < 0 || remote_ip.family != family) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Proxied remote address is invalid " "(address=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -533,14 +543,14 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) /* local address */ if (*fields == NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Field for proxied local address is missing " "(rip=%s)", net_ip2addr(real_remote_ip)); return -1; } if (net_addr2ip(*fields, &local_ip) < 0 || local_ip.family != family) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Proxied local address is invalid " "(address=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -550,13 +560,13 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) /* remote port */ if (*fields == NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Field for proxied local port is missing " "(rip=%s)", net_ip2addr(real_remote_ip)); return -1; } if (net_str2port(*fields, &remote_port) < 0) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Proxied remote port is invalid " "(port=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -566,13 +576,13 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) /* local port */ if (*fields == NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Field for proxied local port is missing " "(rip=%s)", net_ip2addr(real_remote_ip)); return -1; } if (net_str2port(*fields, &local_port) < 0) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Proxied local port is invalid " "(port=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -581,7 +591,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) fields++; if (*fields != NULL) { - i_error("haproxy(v1): Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Header line has spurius extra field " "(field=`%s', rip=%s)", str_sanitize(*fields, 64), net_ip2addr(real_remote_ip)); @@ -592,11 +602,12 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn) if ((ret = master_service_haproxy_recv(fd, rbuf, size, 0))<=0) { if (ret < 0) - i_info("haproxy: Client disconnected (rip=%s): %m", + e_info(hpconn->event, + "Client disconnected (rip=%s): %m", net_ip2addr(real_remote_ip)); return ret; } else if (ret != (ssize_t)size) { - i_error("haproxy: Client disconnected: " + e_error(hpconn->event, "Client disconnected: " "Failed to read full header (rip=%s)", net_ip2addr(real_remote_ip)); return -1; @@ -643,8 +654,9 @@ master_service_haproxy_conn_is_trusted(struct master_service *service, net = t_strsplit_spaces(service->set->haproxy_trusted_networks, ", "); for (; *net != NULL; net++) { if (net_parse_range(*net, &net_ip, &bits) < 0) { - i_error("haproxy_trusted_networks: " - "Invalid network '%s'", *net); + e_error(service->event, + "haproxy_trusted_networks: Invalid network '%s'", + *net); break; } @@ -657,21 +669,24 @@ master_service_haproxy_conn_is_trusted(struct master_service *service, void master_service_haproxy_new(struct master_service *service, struct master_service_connection *conn) { - struct master_service_haproxy_conn *hpconn; - pool_t pool; + struct event *event = event_create(service->event); + event_set_append_log_prefix(event, "haproxy: "); if (!master_service_haproxy_conn_is_trusted(service, conn)) { - i_warning("haproxy: Client not trusted (rip=%s)", + e_warning(event, "Client not trusted (rip=%s)", net_ip2addr(&conn->real_remote_ip)); master_service_client_connection_handled(service, conn); + event_unref(&event); return; } - pool = pool_alloconly_create("haproxy connection", 128); - hpconn = p_new(pool, struct master_service_haproxy_conn, 1); + pool_t pool = pool_alloconly_create("haproxy connection", 128); + struct master_service_haproxy_conn *hpconn = + p_new(pool, struct master_service_haproxy_conn, 1); hpconn->pool = pool; hpconn->conn = *conn; hpconn->service = service; + hpconn->event = event; DLLIST_PREPEND(&service->haproxy_conns, hpconn); hpconn->io = io_add(conn->fd, IO_READ, diff --git a/src/lib-master/master-service-private.h b/src/lib-master/master-service-private.h index 12c80343ac..3930a248f6 100644 --- a/src/lib-master/master-service-private.h +++ b/src/lib-master/master-service-private.h @@ -24,6 +24,7 @@ struct master_service_listener { struct master_service { struct ioloop *ioloop; + struct event *event; char *name; char *configured_name; diff --git a/src/lib-master/master-service-settings-cache.c b/src/lib-master/master-service-settings-cache.c index fc409fcff3..109d450c84 100644 --- a/src/lib-master/master-service-settings-cache.c +++ b/src/lib-master/master-service-settings-cache.c @@ -91,7 +91,8 @@ int master_service_settings_cache_init_filter(struct master_service_settings_cac if (cache->filters != NULL) return 0; if (master_service_settings_get_filters(cache->service, &filters, &error) < 0) { - i_error("master-service: cannot get filters: %s", error); + e_error(cache->service->event, + "master-service: cannot get filters: %s", error); return -1; } diff --git a/src/lib-master/master-service-ssl.c b/src/lib-master/master-service-ssl.c index 06cd98184d..e3b9fc5fec 100644 --- a/src/lib-master/master-service-ssl.c +++ b/src/lib-master/master-service-ssl.c @@ -90,7 +90,8 @@ void master_service_ssl_ctx_init(struct master_service *service) if (ssl_iostream_context_init_server(&ssl_set, &service->ssl_ctx, &error) < 0) { - i_error("SSL context initialization failed, disabling SSL: %s", + e_error(service->event, + "SSL context initialization failed, disabling SSL: %s", error); master_service_ssl_io_listeners_remove(service); return; diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index 9a591ad413..9d2307bf3f 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -55,7 +55,8 @@ static struct event_category master_service_category = { static char *master_service_category_name; static void master_service_io_listeners_close(struct master_service *service); -static int master_service_get_login_state(enum master_login_state *state_r); +static int master_service_get_login_state(struct master_service *service, + enum master_login_state *state_r); static void master_service_refresh_login_state(struct master_service *service); static void master_status_send(struct master_service *service, bool important_update); @@ -86,7 +87,8 @@ log_killed_signal(struct master_service *service, const siginfo_t *si) if (service->killed_signal_logged) return; - i_warning("Killed with signal %d (by pid=%s uid=%s code=%s)", + e_warning(service->event, + "Killed with signal %d (by pid=%s uid=%s code=%s)", si->si_signo, dec2str(si->si_pid), dec2str(si->si_uid), lib_signal_code_to_str(si->si_signo, si->si_code)); service->killed_signal_logged = TRUE; @@ -486,6 +488,14 @@ master_service_init(const char *name, enum master_service_flags flags, service->argv = *argv; service->name = i_strdup(name); service->configured_name = i_strdup(service_configured_name); + + master_service_category_name = + i_strdup_printf("service:%s", service->configured_name); + master_service_category.name = master_service_category_name; + event_register_callback(master_service_event_callback); + + service->event = event_create(NULL); + /* keep getopt_str first in case it contains "+" */ service->getopt_str = *getopt_str == '\0' ? i_strdup(master_service_getopt_string()) : @@ -536,11 +546,6 @@ master_service_init(const char *name, enum master_service_flags flags, i_set_failure_prefix("%s: ", service->configured_name); } - master_service_category_name = - i_strdup_printf("service:%s", service->configured_name); - master_service_category.name = master_service_category_name; - event_register_callback(master_service_event_callback); - /* Initialize debug logging */ value = getenv(DOVECOT_LOG_DEBUG_ENV); if (value != NULL) { @@ -548,7 +553,8 @@ master_service_init(const char *name, enum master_service_flags flags, const char *error; filter = event_filter_create(); if (event_filter_parse(value, filter, &error) < 0) { - i_error("Invalid "DOVECOT_LOG_DEBUG_ENV" - ignoring: %s", + e_error(service->event, + "Invalid "DOVECOT_LOG_DEBUG_ENV" - ignoring: %s", error); } else { event_set_global_debug_log_filter(filter); @@ -1182,7 +1188,8 @@ void master_service_get_kill_time(struct master_service *service, if (sigterm_blocked) { if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) - i_error("sigprocmask(SIG_SETMASK) failed: %m"); + e_error(service->event, + "sigprocmask(SIG_SETMASK) failed: %m"); } } @@ -1207,10 +1214,10 @@ master_service_anvil_send(struct master_service *service, const char *cmd) logging an error about losing connection to it */ return FALSE; } - i_error("write(anvil) failed: %m"); + e_error(service->event, "write(anvil) failed: %m"); return FALSE; } else if (ret == 0) { - i_error("write(anvil) failed: EOF"); + e_error(service->event, "write(anvil) failed: EOF"); return FALSE; } else { i_assert((size_t)ret == strlen(cmd)); @@ -1314,7 +1321,7 @@ void master_service_client_connection_handled(struct master_service *service, { if (!conn->accepted) { if (close(conn->fd) < 0) - i_error("close(service connection) failed: %m"); + e_error(service->event, "close(service connection) failed: %m"); master_service_client_connection_destroyed(service); } else if (conn->fifo) { /* reading FIFOs stays open forever, don't count them @@ -1419,16 +1426,17 @@ static void master_service_set_login_state(struct master_service *service, master_service_io_listeners_add(service); return; } - i_error("Invalid master login state: %d", state); + e_error(service->event, "Invalid master login state: %d", state); } -static int master_service_get_login_state(enum master_login_state *state_r) +static int master_service_get_login_state(struct master_service *service, + enum master_login_state *state_r) { off_t ret; ret = lseek(MASTER_LOGIN_NOTIFY_FD, 0, SEEK_CUR); if (ret < 0) { - i_error("lseek(login notify fd) failed: %m"); + e_error(service->event, "lseek(login notify fd) failed: %m"); return -1; } *state_r = ret == MASTER_LOGIN_STATE_FULL ? @@ -1440,7 +1448,7 @@ static void master_service_refresh_login_state(struct master_service *service) { enum master_login_state state; - if (master_service_get_login_state(&state) == 0) + if (master_service_get_login_state(service, &state) == 0) master_service_set_login_state(service, state); } @@ -1507,6 +1515,7 @@ static void master_service_free(struct master_service *service) i_free(service->config_path); i_free(service->current_user); i_free(service->last_kick_signal_user); + event_unref(&service->event); i_free(service); } @@ -1542,7 +1551,7 @@ static void master_service_overflow(struct master_service *service) timeout_remove(&service->to_overflow_call); - if (master_service_get_login_state(&state) < 0 || + if (master_service_get_login_state(service, &state) < 0 || state != MASTER_LOGIN_STATE_FULL) { /* service is no longer full (or we couldn't check if it is) */ return; @@ -1654,7 +1663,7 @@ master_service_accept(struct master_service_listener *l, const char *conn_name, /* BSDI fails accept(fifo) with EINVAL. */ } else { errno = orig_errno; - i_error("net_accept() failed: %m"); + e_error(service->event, "net_accept() failed: %m"); /* try again later after one of the existing connections has died */ master_service_io_listeners_remove(service); @@ -1723,7 +1732,8 @@ static void master_service_listen(struct master_service_listener *l) master_service_accept(l, conn_name, master_admin_conn); if (sigterm_blocked) { if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) - i_error("sigprocmask(SIG_SETMASK) failed: %m"); + e_error(service->event, + "sigprocmask(SIG_SETMASK) failed: %m"); } } @@ -1779,7 +1789,8 @@ static void master_service_io_listeners_close(struct master_service *service) if (service->listeners[i].fd != -1 && !master_admin_client_can_accept(service->listeners[i].name)) { if (close(service->listeners[i].fd) < 0) { - i_error("close(listener %d) failed: %m", + e_error(service->event, + "close(listener %d) failed: %m", service->listeners[i].fd); } service->listeners[i].fd = -1; @@ -1824,13 +1835,16 @@ master_status_send(struct master_service *service, bool important_update) service->initial_status_sent = TRUE; } else if (ret >= 0) { /* shouldn't happen? */ - i_error("write(master_status_fd) returned %d", (int)ret); + e_error(service->event, + "write(master_status_fd) returned %d", (int)ret); service->master_status.pid = 0; io_remove(&service->io_status_write); } else if (errno != EAGAIN) { /* failure */ - if (errno != EPIPE) - i_error("write(master_status_fd) failed: %m"); + if (errno != EPIPE) { + e_error(service->event, + "write(master_status_fd) failed: %m"); + } service->master_status.pid = 0; io_remove(&service->io_status_write); } else if (important_update) { @@ -1953,9 +1967,9 @@ void master_service_set_current_user(struct master_service *service, service->current_user = i_strdup(user); i_free(old_user); - if (sigterm_blocked) { - if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) - i_error("sigprocmask(SIG_SETMASK) failed: %m"); + if (sigterm_blocked && sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) { + e_error(service->event, + "sigprocmask(SIG_SETMASK) failed: %m"); } } @@ -1970,8 +1984,8 @@ void master_service_set_last_kick_signal_user(struct master_service *service, service->last_kick_signal_user = i_strdup(user); service->last_kick_signal_user_accessed = 0; - if (sigterm_blocked) { - if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) - i_error("sigprocmask(SIG_SETMASK) failed: %m"); + if (sigterm_blocked && sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) { + e_error(service->event, + "sigprocmask(SIG_SETMASK) failed: %m"); } } diff --git a/src/lib-master/stats-client.c b/src/lib-master/stats-client.c index e6b24c7257..d210952e59 100644 --- a/src/lib-master/stats-client.c +++ b/src/lib-master/stats-client.c @@ -55,7 +55,8 @@ stats_client_handshake(struct stats_client *client, const char *const *args) const char *error; if (client_handshake_filter(args, &filter, &error) < 0) { - i_error("stats: Received invalid handshake: %s (input: %s)", + e_error(client->conn.event, + "stats: Received invalid handshake: %s (input: %s)", error, t_strarray_join(args, "\t")); return -1; } @@ -338,7 +339,8 @@ static void stats_client_connect(struct stats_client *client) stats_client_wait_handshake(client); } else if (!client->silent_notfound_errors || (errno != ENOENT && errno != ECONNREFUSED)) { - i_error("net_connect_unix(%s) failed: %m", client->conn.name); + e_error(client->conn.event, + "net_connect_unix(%s) failed: %m", client->conn.name); } }