summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-08-21 21:38:19 +0200
committerTobi Oetiker <tobi@oetiker.ch>2007-08-21 21:38:19 +0200
commitba4e1c581d671ca47bed2ba19bae37849c27a935 (patch)
treedf97328e2c1a21a6217cefec1958f06ea67c74c2
parenta7516a949c37dca39141dee7baeb72b01f262b29 (diff)
downloadsmokeping-ba4e1c581d671ca47bed2ba19bae37849c27a935.tar.gz
smokeping-ba4e1c581d671ca47bed2ba19bae37849c27a935.tar.xz
fix cache handling
-rw-r--r--lib/Smokeping/Slave.pm6
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;
}