]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Fixed recent tag reimplementation to actually work.
authorTimo Sirainen <tss@iki.fi>
Mon, 30 Nov 2015 19:39:07 +0000 (21:39 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 30 Nov 2015 19:39:07 +0000 (21:39 +0200)
We still just created one large vhosts pool for all tags containing all the
hosts.

src/director/mail-host.c

index 240b690796e05a3bce7bf6516384b18ada7d0f80..c7c1a286ee777f979fafb79e352d7482d46c1104 100644 (file)
@@ -67,7 +67,7 @@ static void mail_vhost_add(struct mail_tag *tag, struct mail_host *host)
        char num_str[MAX_INT_STRLEN];
        unsigned int i, j;
 
-       if (host->down)
+       if (host->down || host->tag != tag)
                return;
 
        ip_str = net_ip2addr(&host->ip);
@@ -110,7 +110,7 @@ mail_tag_vhosts_sort_direct(struct mail_host_list *list, struct mail_tag *tag)
        /* rebuild vhosts */
        array_clear(&tag->vhosts);
        array_foreach(&list->hosts, hostp) {
-               if ((*hostp)->down)
+               if ((*hostp)->down || (*hostp)->tag != tag)
                        continue;
                for (i = 0; i < (*hostp)->vhost_count; i++) {
                        vhost = array_append_space(&tag->vhosts);