]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Use the new listener type field to distinguish the various listener types.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 18 Nov 2022 20:46:31 +0000 (21:46 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Sun, 11 Dec 2022 21:58:50 +0000 (21:58 +0000)
src/imap/imap-settings.c
src/imap/main.c

index e894e7e739412b7cbe21f765ee33de0d8733d967..953065d0474f72d0482d37102934ff75755dd5d7 100644 (file)
@@ -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 = "",
index 2e68a4fe563d446eadc814d544a1bfa990858a9e..da8bf3648ca2cd04628a289f4218f3c51cd75ae8 100644 (file)
@@ -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;