X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fconfiguration.pl;h=cb9f1946297d79179a720c10f675fb23016cc7ee;hb=1256794cae0d863c829011df3f87dc1fb70f977d;hp=a49ffeec990317d55cafc473b502627d150a785d;hpb=ef3eaa49d2dfc9ce74411ec534d31c46875d28e7;p=spider.git diff --git a/cmd/show/configuration.pl b/cmd/show/configuration.pl index a49ffeec..cb9f1946 100644 --- a/cmd/show/configuration.pl +++ b/cmd/show/configuration.pl @@ -21,24 +21,27 @@ if ($list[0] && $list[0] =~ /^NOD/) { foreach $dxchan (@ch) { @val = sort {$a->call cmp $b->call} grep { $_->dxchan == $dxchan } @nodes; - my $call = $dxchan->call; - $call = "($call)" if $dxchan->here == 0; @l = (); + my $call = $dxchan->call; + $call ||= '???'; + $call = "($call)" unless $dxchan->here; push @l, $call; my $i = 0; - foreach $call (@val) { + foreach my $ref (@val) { if ($i >= 5) { push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; @l = (); push @l, ""; $i = 0; } - my $s = $call->call; - $s = sprintf "(%s)", $s unless $call->here; + my $s = $ref->call; + $s ||= '???'; + $s = sprintf "(%s)", $s unless $ref->here; push @l, $s; $i++; } + push @l, "" while ($i++ < 5); push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; } } else { @@ -46,8 +49,9 @@ if ($list[0] && $list[0] =~ /^NOD/) { foreach $node (@nodes) { next if scalar @list && !grep $node->call =~ /^$_/, @list; my $call = $node->call; - $call = "($call)" unless $node->here; @l = (); + $call ||= '???'; + $call = "($call)" unless $node->here; push @l, $call; @val = sort $node->users; @@ -72,6 +76,7 @@ if ($list[0] && $list[0] =~ /^NOD/) { push @l, $s; $i++; } + push @l, "" while ($i++ < 5); push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; } }