From: Stephan Bosch Date: Fri, 18 Nov 2022 20:46:31 +0000 (+0100) Subject: imap: Use the new listener type field to distinguish the various listener types. X-Git-Tag: 2.4.0~3302 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18c1ab0d601e06aa98f93c051a0280ea95f96efa;p=thirdparty%2Fdovecot%2Fcore.git imap: Use the new listener type field to distinguish the various listener types. --- diff --git a/src/imap/imap-settings.c b/src/imap/imap-settings.c index e894e7e739..953065d047 100644 --- a/src/imap/imap-settings.c +++ b/src/imap/imap-settings.c @@ -19,12 +19,14 @@ static bool imap_settings_verify(void *_set, pool_t pool, static struct file_listener_settings imap_unix_listeners_array[] = { { .path = "login/imap", + .type = "login", .mode = 0666, .user = "", .group = "", }, { .path = "imap-master", + .type = "master", .mode = 0600, .user = "", .group = "", diff --git a/src/imap/main.c b/src/imap/main.c index 2e68a4fe56..da8bf3648c 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -454,11 +454,14 @@ static const struct master_admin_client_callback admin_callbacks = { static void client_connected(struct master_service_connection *conn) { + const char *type; + /* when running standalone, we shouldn't even get here */ i_assert(login_server != NULL); master_service_client_connection_accept(conn); - if (strcmp(conn->name, "imap-master") == 0) { + type = master_service_connection_get_type(conn); + if (strcmp(type, "master") == 0) { /* restoring existing IMAP connection (e.g. from imap-idle) */ imap_master_client_create(conn->fd); return;