From: Timo Sirainen Date: Mon, 30 Nov 2015 19:39:07 +0000 (+0200) Subject: director: Fixed recent tag reimplementation to actually work. X-Git-Tag: 2.2.20.rc1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=764178ebbd355dc0d1b383e495ce8532ae6606cd;p=thirdparty%2Fdovecot%2Fcore.git director: Fixed recent tag reimplementation to actually work. We still just created one large vhosts pool for all tags containing all the hosts. --- diff --git a/src/director/mail-host.c b/src/director/mail-host.c index 240b690796..c7c1a286ee 100644 --- a/src/director/mail-host.c +++ b/src/director/mail-host.c @@ -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);