+31Jan25======================================================================
+1. Fixed botched node link initialisation check. This what prevent ann/full
+ working and would have stopped talk, rcmd etc etc.
+2. Added a field called 'state' to the who command to allow sysops to
+ diagnose some connection initialisation problems.
29Jan25======================================================================
1. Fix dx command <cough>. "I never changed that bit". If I had this would
never have happened.
$ipaddr ||= $main::mycall; # emergency backstop
my $spot = DXProt::pc61($spotter, $freq, $spotted, unpad($line), $ipaddr);
-# $self->dx_spot(undef, undef, @spot);
if ($self->isslugged) {
push @{$self->{sluggedpcs}}, [61, $spot, \@spot];
} else {
unless (Spot::dup_find(@spot)) {
Spot::dup_add(0, @spot);
Spot::add(@spot);
+ $self->dx_spot(undef, undef, @spot);
DXProt::send_dx_spot($self, $spot, @spot);
} else {
push @out, "Duplicate spot: $line";
my $dxchan;\r
my @out;\r
\r
-push @out, " Callsign Type Started Name Ave RTT Link";\r
+push @out, " Callsign Type State Started Name Ave RTT Link";\r
\r
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {\r
my $call = $dxchan->call();\r
$ip = $dxchan->hostname;\r
$ip = "AGW Port ($conn->{agwport})" if exists $conn->{agwport};\r
}\r
- push @out, sprintf "%10s $type $sort $t %-10.10s $ping $ip", $call, $name;\r
+ my $state = $dxchan->state;\r
+ push @out, sprintf "%10s $type $sort %-8.8s $t %-10.10s $ping $ip", $call, $state, $name;\r
}\r
\r
return (1, @out)\r
['zone', 'nz', 3],
], 'Filter::Cmd');
+sub check_available
+{
+ my $self = shift;
+ my $origin = shift;
+ my $pcno = shift;
+
+ return 0 if $self == $main::me;
+
+ unless ($self->is_node && $self->state eq 'normal') {
+ dbg("PC$pcno sent to $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return 1;
+ }
+ return 0;
+}
+
our %pc11q;
# this is a place to park an incoming PC11 in the sure and certain hope that
# a PC61 will be along soon. This has the side benefit that it will delay a
return;
}
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
-
-
+ return if $self->check_available($origin, $pcno);
+
# is it for me or one of mine?
my ($from, $to, $via, $call, $dxchan);
$from = $pc->[1];
my $pc = shift;
my $recurse = shift || 0;
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
-
+ return if $self->check_available($origin, $pcno);
+
# route 'foreign' pc26s
if ($pcno == 26) {
if ($pc->[7] ne $main::mycall) {
my $origin = shift;
my $pc = shift;
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
+ return if $self->check_available($origin, $pcno);
# announce duplicate checking
$pc->[3] =~ s/^\s+//; # remove leading blanks
my $origin = shift;
my $pc = shift;
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
-
+ return unless $self->check_available;
+
my $call = $pc->[1];
my $sort = $pc->[2];
my $val = $pc->[3];
my $origin = shift;
my $pc = shift;
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
+ return if $self->check_available($origin, $pcno);
$self->process_rcmd($pc->[1], $pc->[2], $pc->[3], $pc->[4]);
}
my $pc = shift;
# $self->{do_pc9x} ||= 1;
-
- unless ($self->state eq 'normal') {
- dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
- return;
- }
+
+ return if $self->check_available($origin, $pcno);
my $pcall = $pc->[1]; # this is now checked earlier