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

index f837aba243944380416e45aa4069612d71f4df01..25e2238d66bb2a69a1cbde5798c8a4714f9e5d15 100644 (file)
@@ -20,6 +20,7 @@ static struct file_listener_settings replicator_unix_listeners_array[] = {
        },
        {
                .path = "replicator-doveadm",
+               .type = "doveadm",
                .mode = 0,
                .user = "$default_internal_user",
                .group = "",
index c85b37662067c81de008dfeec59e3c93f38c53c0..37ea293e38b0b89ab2944e12fce899723fd00065 100644 (file)
@@ -25,8 +25,11 @@ static struct timeout *to_dump;
 
 static void client_connected(struct master_service_connection *conn)
 {
+       const char *type;
+
        master_service_client_connection_accept(conn);
-       if (strcmp(conn->name, "replicator-doveadm") == 0)
+       type = master_service_connection_get_type(conn);
+       if (strcmp(type, "doveadm") == 0)
                doveadm_connection_create(brain, conn->fd);
        else
                (void)notify_connection_create(conn->fd, queue);