lib/Kolab.pm

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Sun Mar 20 14:47:09 CET 2011


 lib/Kolab.pm |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit bb6a22f3ff17c3dbc087f29b8bcf799ee0503be9
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sun Mar 20 13:46:00 2011 +0000

    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.

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





More information about the commits mailing list