Applied patch from ticket #8, patch for cache content leaks to global

git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@119 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
wimpunk 2010-09-13 06:31:58 +00:00
parent c3a888bc6a
commit a7d8c50e06

View file

@ -865,9 +865,9 @@ sub read_cache {
%opt = %saved; %opt = %saved;
foreach my $h (keys %cache) { foreach my $h (keys %cache) {
if (exists $config{$h}) { if (exists $config->{$h}) {
foreach (qw(atime mtime wtime ip status)) { foreach (qw(atime mtime wtime ip status)) {
$config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; $config->{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_};
} }
} }
} }
@ -1117,7 +1117,7 @@ sub init_config {
## merge options into host definitions or globals ## merge options into host definitions or globals
if (@hosts) { if (@hosts) {
foreach my $h (@hosts) { foreach my $h (@hosts) {
$config{$h} = %{ merge(\%options, $config{$h}) }; $config{$h} = merge(\%options, $config{$h});
} }
$opt{'host'} = join(',', @hosts); $opt{'host'} = join(',', @hosts);
} else { } else {