summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-20 13:46:00 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-20 13:46:00 (GMT)
commitbb6a22f3ff17c3dbc087f29b8bcf799ee0503be9 (patch)
tree30239d9d41f993a0594500a2ff27726333c573a0
parent6d34adb5141d41e08025c9a8e25d65a9b8375a2b (diff)
downloadperl-Kolab-bb6a22f3ff17c3dbc087f29b8bcf799ee0503be9.tar.gz
Do not set $config{'connect_addr'} if it has already been set.
Use-case scenario: Cyrus Murder setups with load-balanced frontends that use Round-Robin DNS tp spread load do not have the interface to log on to at bind_addr nor local_addr; We need to be able to set an address to connect to.
-rw-r--r--lib/Kolab.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Kolab.pm b/lib/Kolab.pm
index a12846d..0445bd4 100644
--- a/lib/Kolab.pm
+++ b/lib/Kolab.pm
@@ -249,10 +249,12 @@ sub reloadConfig
# connect to services at local address if binding to any interface,
# otherwise use the address specified for the public interface.
- if ($config{'bind_any'} =~ /true/i) {
- $config{'connect_addr'} = $config{'local_addr'};
- } else {
- $config{'connect_addr'} = $config{'bind_addr'};
+ if (!$config{'connect_addr'}) {
+ if ($config{'bind_any'} =~ /true/i) {
+ $config{'connect_addr'} = $config{'local_addr'};
+ } else {
+ $config{'connect_addr'} = $config{'bind_addr'};
+ }
}
# Cyrus admin account