summaryrefslogtreecommitdiff
path: root/FS/FS/NetworkMonitoringSystem
diff options
context:
space:
mode:
authorivan <ivan>2011-02-26 02:13:20 +0000
committerivan <ivan>2011-02-26 02:13:20 +0000
commitb7639663bd10992c1ce121f9739a69b22ceccbcc (patch)
treecfb0294074d1d47a193d0f12a10a3b0eca8f6de6 /FS/FS/NetworkMonitoringSystem
parentaab97b9a31aee4b5b7beeddee17e46694224121c (diff)
fix error on port view when you haven't selected a torrus serviceid yet
Diffstat (limited to 'FS/FS/NetworkMonitoringSystem')
-rw-r--r--FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
index 4c3264e..985b1be 100644
--- a/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
+++ b/FS/FS/NetworkMonitoringSystem/Torrus_Internal.pm
@@ -72,7 +72,7 @@ sub port_graphs_link {
# hardcoded for 'main' tree for now
my $self = shift;
my $serviceid = shift;
- my $hash = $self->get_router_serviceids(undef,$serviceid);
+ my $hash = $self->get_router_serviceids(undef,$serviceid) or return '';
my @keys = keys %$hash; # yeah this is weird...
my $host = $keys[0];
my $iface = $hash->{$keys[0]};
@@ -205,7 +205,6 @@ sub _torrus_newddx {
print $new $ddx;
close $new;
- # `date ...` created file names with weird chars in them
my $tmpname = $ddxfile . Date::Format::time2str('%Y%m%d%H%M%S',time);
rename("$ddxfile", $tmpname) or die $!;
rename("$ddxfile.new", $ddxfile) or die $!;
@@ -216,7 +215,8 @@ sub _torrus_newddx {
sub _torrus_reload {
my($self) = @_;
- #i should use IPC::Run and have better error checking
+ #i should use IPC::Run and have better error checking (commands are silent
+ # for success, or output errors)
system('torrus', 'devdiscover', "--in=$ddxfile");