diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-08-21 21:38:19 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-08-21 21:38:19 +0200 |
commit | ba4e1c581d671ca47bed2ba19bae37849c27a935 (patch) | |
tree | df97328e2c1a21a6217cefec1958f06ea67c74c2 | |
parent | a7516a949c37dca39141dee7baeb72b01f262b29 (diff) | |
download | smokeping-ba4e1c581d671ca47bed2ba19bae37849c27a935.tar.gz smokeping-ba4e1c581d671ca47bed2ba19bae37849c27a935.tar.xz |
fix cache handling
-rw-r--r-- | lib/Smokeping/Slave.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Smokeping/Slave.pm b/lib/Smokeping/Slave.pm index 6b693cb..3f033a0 100644 --- a/lib/Smokeping/Slave.pm +++ b/lib/Smokeping/Slave.pm @@ -66,8 +66,8 @@ sub submit_results { $store .= ".cache"; my $restore = -f $store ? retrieve $store : []; unlink $store; - my $data = get_results($slave_cfg, $cfg, $probes, $cfg->{Targets}, '', $myprobe); - push @$restore, @$data; + my $new = get_results($slave_cfg, $cfg, $probes, $cfg->{Targets}, '', $myprobe); + push @$restore, @$new; my $data_dump = join("\n",@{$restore}) || ""; my $ua = LWP::UserAgent->new( agent => 'smokeping-slave/1.0', @@ -109,7 +109,7 @@ sub submit_results { # ok did not manage to get our data to the server. # we store the result so that we can try again later. warn "WARNING Master said ".$response->status_line()."\n"; - nstore $data, $store; + nstore $restore, $store; } return undef; } |