diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-06-09 13:49:48 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-06-09 13:49:48 (GMT) |
commit | ec207a8b391813e225f6d4fb68dfeb90f0ca29ec (patch) | |
tree | 915db6f81beb1ebaf496f4336e32950c471c51b2 /lib | |
parent | 24d6d8331eea25d38af1806b0afba14648978057 (diff) | |
download | perl-Kolab-ec207a8b391813e225f6d4fb68dfeb90f0ca29ec.tar.gz |
Correct the use of connect_addr, bind_any, bind_addr and local_addr.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kolab.pm | 10 |
1 files changed, 7 insertions, 3 deletions
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'}; } |