From: Stephan Bosch Date: Tue, 22 Nov 2022 20:50:52 +0000 (+0100) Subject: log: Use the new listener type field to distinguish the various listener types. X-Git-Tag: 2.4.0~3298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc33ce45f4f7b1ffb4e99b6c49463136e960e8c2;p=thirdparty%2Fdovecot%2Fcore.git log: Use the new listener type field to distinguish the various listener types. --- diff --git a/src/log/log-settings.c b/src/log/log-settings.c index f2cc1a2d72..f68e1c2508 100644 --- a/src/log/log-settings.c +++ b/src/log/log-settings.c @@ -11,6 +11,7 @@ static struct file_listener_settings log_unix_listeners_array[] = { { .path = "log-errors", + .type = "errors", .mode = 0600, .user = "", .group = "", diff --git a/src/log/main.c b/src/log/main.c index a6ac950a67..7988083cae 100644 --- a/src/log/main.c +++ b/src/log/main.c @@ -48,11 +48,15 @@ static void client_connected(struct master_service_connection *conn) but here we want log process to stay open until all writers have closed */ conn->fifo = FALSE; - } else if (strcmp(conn->name, "log-errors") == 0) - doveadm_connection_create(errorbuf, conn->fd); - else { - i_error("Unknown listener name: %s", conn->name); - return; + } else { + const char *type = master_service_connection_get_type(conn); + + if (strcmp(type, "errors") == 0) + doveadm_connection_create(errorbuf, conn->fd); + else { + i_error("Unknown listener type/name: %s", type); + return; + } } master_service_client_connection_accept(conn);