ones.
# old style connections, because we are about to get the real deal
if (my $ref = Route::Node::get($call)) {
dbg("ROUTE: $call is already in the routing table, deleting") if isdbg('route');
- my @rout = $ref->del_nodes;
+ my @rout = $ref->delete;
$self->route_pc21($main::mycall, undef, @rout) if @rout;
}
$main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall;
my $h;
$h = 1 if DXChannel::get($ncall);
RouteDB::update($ncall, $self->{call}, $h);
+ if ($h && $self->{call} ne $ncall) {
+ dbg("PCPROT: trying to update a local node, ignored") if isdbg('chanerr');
+ return;
+ }
if (eph_dup($line)) {
dbg("PCPROT: dup PC16 detected") if isdbg('chanerr');
# but remember there will only be one (pair) these because any extras will be
# thrown away.
if (@rout) {
- $self->route_pc21($self->{call}, $line, @rout);
+# $self->route_pc21($self->{call}, $line, @rout);
$self->route_pc19($self->{call}, $line, @rout);
}
if (@pc92out) {
return @nodes;
}
+# this deletes this node completely by grabbing the parents
+# and deleting me from them
+sub delete
+{
+ my $self = shift;
+ my @out;
+
+ $self->_del_users;
+ foreach my $parent (@{$self->{parent}}) {
+ push @out, $parent->del($self);
+ }
+ return @out;
+}
+
sub del_nodes
{
my $parent = shift;