for ($i = 2; $i < $#field; $i++) {
my ($call, $conf, $here) = $field[$i] =~ /^(\S+) (\S) (\d)/o;
next unless $call && $conf && defined $here && is_callsign($call);
+ next if $call eq $main::mycall;
+
$conf = $conf eq '*';
my $r = Route::User::get($call);
my $flags = Route::here($here)|Route::conf($conf);
- if ($r && $r->flags != $flags) {
- $r->flags($flags);
- push @rout, $r;
- } elsif (!$r) {
+ if ($r) {
+ if ($r->flags != $flags) {
+ $r->flags($flags);
+ push @rout, $r;
+ }
+ $r->addparent($ncall);
+ } else {
push @rout, $parent->add_user($call, $flags);
}
# new routing list
my @rout;
my $parent = Route::Node::get($self->{call});
+ unless ($parent) {
+ dbg("DXPROT: my parent $self->{call} has disappeared");
+ $self->disconnect;
+ return;
+ }
# parse the PC19
for ($i = 1; $i < $#field-1; $i += 4) {
$ver = 5000 if $ver eq '0000';
next if $ver < 5000; # only works with version 5 software
next if length $call < 3; # min 3 letter callsigns
+ next if $call eq $main::mycall;
# update it if required
my $r = Route::Node::get($call);
push @rout, $r unless $ar;
}
} else {
- next if $call eq $main::mycall || $call eq $self->{call};
+ if ($call eq $self->{call}) {
+ dbg("DXPROT: my channel route for $call has disappeared");
+ next;
+ };
my $new = Route->new($call); # throw away
if ($self->in_filter_route($new)) {
my @rout;
my $parent = Route::Node::get($self->{call});
unless ($parent) {
- dbg("PCPROT: Route::Node $call not in config") if isdbg('chanerr');
+ dbg("DXPROT: my parent $self->{call} has disappeared");
+ $self->disconnect;
return;
}
my $node = Route::Node::get($call);
if ($pcno == 24) { # set here status
my $call = uc $field[1];
my ($nref, $uref);
- $nref = Route::Node::get($call) && $nref->here($field[2]);
- $uref = Route::User::get($call) && $uref->here($field[2]);
+ $nref = Route::Node::get($call);
+ $uref = Route::User::get($call);
return unless $nref || $uref; # if we don't know where they are, it's pointless sending it on
unless (eph_dup($line)) {
- if ($nref) {
- return unless $self->in_filter_route($nref);
- $self->route_pc24($nref, $field[3])
- }
- if ($uref) {
- return unless $self->in_filter_route($uref);
- $self->route_pc24($uref, $field[3]);
- }
+ $nref->here($field[2]) if $nref;
+ $uref->here($field[2]) if $uref;
+ my $ref = $nref || $uref;
+ return unless $self->in_filter_route($ref);
+ $self->route_pc24($ref, $field[3]);
}
return;
}