Fix initial set of bugs pointed on mailing list

1. Fix Alias for sh/mydx (so it isn't the same as sh/myfdx).
2. Fix sh/c/n uninitialised variable message
3. Fix (and improve) sh/newc gb7 problem
This commit is contained in:
Dirk Koopman 2007-06-22 18:50:11 +01:00
parent 23f64142e2
commit 6230850db2
7 changed files with 35 additions and 19 deletions

View File

@ -1,3 +1,7 @@
22Jun06=======================================================================
1. Fix Alias for sh/mydx (so it isn't the same as sh/myfdx).
2. Fix sh/c/n uninitialised variable message
3. Fix (and improve) sh/newc gb7 problem
21Jun06=======================================================================
1. merge back SIMPLEROUTE branch to issue as official 1.54.
18Jun06=======================================================================

View File

@ -128,14 +128,14 @@ package CmdAlias;
'^sho?w?/fdx/d(\d+)', 'show/dx real from $1', 'show/fdx',
'^sho?w?/fdx', 'show/dx real', 'show/fdx',
'^sho?w?/gre?y?l?i?n?e?', 'show/grayline', 'show/grayline',
'^sho?w?/myd?x?/(\d+)-(\d+)', 'show/dx filter $1-$2', 'show/mydx',
'^sho?w?/myd?x?/(\d+)', 'show/dx filter $1', 'show/mydx',
'^sho?w?/myd?x?/d(\d+)', 'show/dx filter from $1', 'show/mydx',
'^sho?w?/myd?x?', 'show/dx filter', 'show/mydx',
'^sho?w?/myfd?x?/(\d+)-(\d+)', 'show/dx filter real $1-$2', 'show/mydx',
'^sho?w?/myfd?x?/(\d+)', 'show/dx filter real $1', 'show/mydx',
'^sho?w?/myfd?x?/d(\d+)', 'show/dx filter real from $1', 'show/mydx',
'^sho?w?/myfd?x?', 'show/dx filter real', 'show/mydx',
'^sho?w?/myd?x?/(\d+)-(\d+)', 'show/dx filter $1-$2', 'show/mydx',
'^sho?w?/myd?x?/(\d+)', 'show/dx filter $1', 'show/mydx',
'^sho?w?/myd?x?/d(\d+)', 'show/dx filter from $1', 'show/mydx',
'^sho?w?/myd?x?', 'show/dx filter', 'show/mydx',
'^sho?w?/newco?n?\w*/n', 'show/newconfiguration node', 'show/newconfiguration',
'^sho?w?/sta?$', 'show/station', 'show/station',
'^sho?w?/tnc', 'who', 'who',

View File

@ -20,7 +20,7 @@ if ($list[0] && $list[0] =~ /^NOD/) {
my $dxchan;
foreach $dxchan (@ch) {
@val = sort {$a->call cmp $b->call} grep { $_->dxchan == $dxchan } @nodes;
@val = sort {$a->call cmp $b->call} grep { $_->dxchan && $_->dxchan == $dxchan } @nodes;
@l = ();
my $call = $dxchan->call;
$call ||= '???';

View File

@ -16,6 +16,6 @@ if (@list && $list[0] =~ /^NOD/) {
shift @list;
}
push @out, $main::routeroot->config($nodes_only, 0, [], @list);
push @out, $main::routeroot->config($nodes_only, 0, {}, @list);
return (1, @out);

View File

@ -920,9 +920,9 @@ sub format_dx_spot
my $t = ztime($_[2]);
my $loc = '';
my $clth = $self->{consort} eq 'local' ? 29 : 30;
my $comment = substr $_[3], 0, $clth;
my $comment = substr (($_[3] || ''), 0, $clth);
$comment .= ' ' x ($clth - length($comment));
if ($self->{user}->wantgrid) {
if ($self->{user}->wantgrid) {
my $ref = DXUser->get_current($_[4]);
if ($ref) {
$loc = $ref->qra || '';

View File

@ -180,34 +180,36 @@ sub user_call
sub config
{
my $self = shift;
my $nodes_only = shift;
my $nodes_only = shift || 0;
my $level = shift;
my $seen = shift;
my @out;
my $line;
my $call = $self->user_call;
my $call = $self->{call};
my $printit = 1;
dbg("config: $call nodes: $nodes_only level: $level calls: " . join(',', @_)) if isdbg('routec');
# allow ranges
if (@_) {
$printit = grep $call =~ m|$_|, @_;
}
if ($printit) {
my $pcall = $call;
$pcall .= ":" . $self->obscount if $self->via_pc92;
my $pcall = $self->user_call;
$pcall .= ":" . $self->obscount if isdbg('obscount');
$line = ' ' x ($level*2) . "$pcall";
$call = ' ' x length $pcall;
$pcall = ' ' x length $pcall;
# recursion detector
if ((DXChannel::get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) {
if ((DXChannel::get($call) && $level > 1) || $seen->{$call}) {
$line .= ' ...';
push @out, $line;
return @out;
}
push @$seen, $self->{call};
$seen->{$call}++;
# print users
unless ($nodes_only) {
@ -226,7 +228,7 @@ sub config
} else {
$line =~ s/\s+$//;
push @out, $line;
$line = ' ' x ($level*2) . "$call->$c ";
$line = ' ' x ($level*2) . "$pcall->$c ";
}
}
}
@ -234,6 +236,12 @@ sub config
$line =~ s/->$//g;
$line =~ s/\s+$//;
push @out, $line if length $line;
} else {
# recursion detector
if ((DXChannel::get($call) && $level > 1) || $seen->{$call}) {
return @out;
}
$seen->{$call}++;
}
# deal with more nodes
@ -242,8 +250,12 @@ sub config
if ($nref) {
my $c = $nref->user_call;
# dbg("recursing from $call -> $c") if isdbg('routec');
push @out, $nref->config($nodes_only, $level+1, $seen, @_);
dbg("recursing from $call -> $c") if isdbg('routec');
my @rout = $nref->config($nodes_only, $level+1, $seen, @_);
if (@rout && @_) {
push @out, ' ' x ($level*2) . $self->user_call unless grep /^\s+$call/, @out;
}
push @out, @rout;
} else {
push @out, ' ' x (($level+1)*2) . "$ncall?" if @_ == 0 || (@_ && grep $ncall =~ m|$_|, @_);
}

View File

@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
$version = '1.54';
$subversion = '0';
$build = '59';
$build = '60';
1;