From 25d4c21620dd04ce9c472ec5141560cefdf9ae29 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Wed, 5 Sep 2007 06:13:24 +0000 Subject: * fixes for pod generation * skip multi target hosts for slaves * report content-lengh in header --- lib/Smokeping/Graphs.pm | 3 ++- lib/Smokeping/Master.pm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Smokeping') diff --git a/lib/Smokeping/Graphs.pm b/lib/Smokeping/Graphs.pm index 2c62367..bb7002d 100644 --- a/lib/Smokeping/Graphs.pm +++ b/lib/Smokeping/Graphs.pm @@ -269,10 +269,11 @@ sub get_multi_detail ($$$$;$){ if ($mode eq 'a'){ # ajax mode open my $img, "${imgbase}_${end}_${start}.png"; binmode $img; - print "Content-Type: image/png\n\n"; + print "Content-Type: image/png\n"; my $data; read($img,$data,(stat($img))[7]); close $img; + print "Content-Length: ".length($data)."\n\n"; print $data; unlink "${imgbase}_${end}_${start}.png"; exit; diff --git a/lib/Smokeping/Master.pm b/lib/Smokeping/Master.pm index ddd708e..065270b 100644 --- a/lib/Smokeping/Master.pm +++ b/lib/Smokeping/Master.pm @@ -38,6 +38,7 @@ sub get_targets { # dynamic hosts can only be queried from the # master next if $key eq 'host' and $trg->{$key} eq 'DYNAMIC'; + next if $key eq 'host' and $trg->{$key} =~ m|^/|; # skip multi targets next if $key eq 'host' and not ( defined $trg->{slaves} and $trg->{slaves} =~ /\b${slave}\b/); if (ref $trg->{$key} eq 'HASH'){ $return{$key} = get_targets ($trg->{$key},$slave); -- cgit v1.2.3-24-g4f1b