summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-03-06 07:21:12 +0100
committerTobi Oetiker <tobi@oetiker.ch>2008-03-06 07:21:12 +0100
commit73fb8150992d02888d083581e86b83002e0050c8 (patch)
treed4a8f6553c543e6cc9fafd78f1ce672a4b333ba7 /lib/Smokeping
parent6c15f78cac4a0b94907352c4184d6d7d5ca87164 (diff)
downloadsmokeping-73fb8150992d02888d083581e86b83002e0050c8.tar.gz
smokeping-73fb8150992d02888d083581e86b83002e0050c8.tar.xz
fix retrun value processing (regression from last patch)
Diffstat (limited to 'lib/Smokeping')
-rw-r--r--lib/Smokeping/Master.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Smokeping/Master.pm b/lib/Smokeping/Master.pm
index d31c95b..f359998 100644
--- a/lib/Smokeping/Master.pm
+++ b/lib/Smokeping/Master.pm
@@ -143,7 +143,7 @@ sub get_slaveupdates {
my $name = shift;
my $slave = shift;
my $file = $name . "." . $slave. ".slave_cache";
- my @empty = ();
+ my $empty = [];
my $data;
if ( -r $file and open (my $lock, '>>', "$file.lock") ) {
if ( flock $lock, LOCK_EX ){
@@ -151,7 +151,7 @@ sub get_slaveupdates {
unlink $file;
if ($@) { #error
warn "Loading $file: $@";
- return @empty;
+ return $empty;
}
} else {
warn "Could not lock $file. Will skip and try again in the next round. No harm done!\n";
@@ -159,7 +159,7 @@ sub get_slaveupdates {
close $lock;
return $data;
}
- return @empty;
+ return $empty;
}