dovecot-2.0: director: inet_listener port finder should ignore d...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Nov 2 15:43:47 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/f55b91aaddfe
changeset: 12357:f55b91aaddfe
user: Timo Sirainen <tss at iki.fi>
date: Tue Nov 02 13:43:43 2010 +0000
description:
director: inet_listener port finder should ignore doveadm's port.
diffstat:
src/director/main.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r b7511f567d2e -r f55b91aaddfe src/director/main.c
--- a/src/director/main.c Mon Nov 01 14:33:26 2010 +0000
+++ b/src/director/main.c Tue Nov 02 13:43:43 2010 +0000
@@ -103,7 +103,9 @@
}
}
-static unsigned int find_inet_listener_port(struct ip_addr *ip_r)
+static unsigned int
+find_inet_listener_port(struct ip_addr *ip_r,
+ const struct director_settings *set)
{
unsigned int i, socket_count, port;
@@ -111,7 +113,8 @@
for (i = 0; i < socket_count; i++) {
int fd = MASTER_LISTEN_FD_FIRST + i;
- if (net_getsockname(fd, ip_r, &port) == 0 && port > 0)
+ if (net_getsockname(fd, ip_r, &port) == 0 && port > 0 &&
+ port != set->director_doveadm_port)
return port;
}
return 0;
@@ -150,7 +153,7 @@
userdb_socket_path = i_strconcat(set->base_dir,
"/"AUTH_USERDB_SOCKET_PATH, NULL);
- listen_port = find_inet_listener_port(&listen_ip);
+ listen_port = find_inet_listener_port(&listen_ip, set);
if (listen_port == 0 && *set->director_servers != '\0') {
i_fatal("No inet_listeners defined for director service "
"(for standalone keep director_servers empty)");
More information about the dovecot-cvs
mailing list