lib/Kolab.pm

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Thu Jun 9 15:50:22 CEST 2011


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

New commits:
commit ec207a8b391813e225f6d4fb68dfeb90f0ca29ec
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Jun 9 14:49:48 2011 +0100

    Correct the use of connect_addr, bind_any, bind_addr and local_addr.

diff --git a/lib/Kolab.pm b/lib/Kolab.pm
index 5b8197f..f33ba28 100644
--- a/lib/Kolab.pm
+++ b/lib/Kolab.pm
@@ -264,9 +264,13 @@ This function reloads the configuration for the Kolab perl library.
 
     # connect to services at local address if binding to any interface,
     # otherwise use the address specified for the public interface.
-    if (!$config{'connect_addr'}) {
-        if ($config{'bind_any'} =~ /true/i) {
-            $config{'connect_addr'} = $config{'local_addr'};
+    if ( !exists $config{'connect_addr'} ) {
+        if ( exists $config{'bind_any'} ) {
+            if ($config{'bind_any'} =~ /true/i) {
+                $config{'connect_addr'} = '127.0.0.1';
+            } else {
+                $config{'connect_addr'} = $config{'bind_addr'};
+            }
         } else {
             $config{'connect_addr'} = $config{'bind_addr'};
         }





More information about the commits mailing list