X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=9c04497680673939c3fc8ca9ac6c3e520e932ed8;hb=171f9837d8bb99d05c2b3bb87066d25d448eabd3;hp=3ef7b0750e3695a878f11da518d3ae10ba6ca930;hpb=169940ee254d0a1a014a62dae12a8fbebc4e2fda;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3ef7b075..9c044976 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -645,7 +645,9 @@ sub normal # if there is a parent, proceed, otherwise if there is a latent PC19 in the PC19list, # fix it up in the routing tables and issue it forth before the PC16 unless ($parent) { - if (my ($nl = $pc19list{$ncall}) && @field > 2) { + my $nl = $pc19list{$ncall}; + + if ($nl && @field > 3) { # 3 because of the hop count! # this is a new (remembered) node, now attach it to me if it isn't in filtered # and we haven't disallowed it @@ -659,8 +661,6 @@ sub normal $user->node($ncall); } - delete $pc19list{$ncall}; # whatever happens - it goes - my $wantpc19 = $user->wantroutepc19; if ($wantpc19 || !defined $wantpc19) { my $new = Route->new($ncall); # throw away @@ -688,6 +688,7 @@ sub normal } else { return; } + delete $pc19list{$ncall}; } } else { dbg("PCPROT: Node $ncall not in config") if isdbg('chanerr'); @@ -728,11 +729,13 @@ sub normal my $flags = Route::here($here)|Route::conf($conf); if ($r) { + my @add; + push @add, $r->addparent($parent); if ($r->flags != $flags) { $r->flags($flags); - push @rout, $r; + push @add, $r unless @add; } - $r->addparent($parent); + push @rout, @add; } else { push @rout, $parent->add_user($call, $flags); } @@ -910,6 +913,7 @@ sub normal my $new = Route->new($call); # throw away if ($self->in_filter_route($new)) { my $ar = $parent->add($call, $ver, $flags); + $user->wantroutepc19(1) unless defined $user->wantroutepc19; push @rout, $ar if $ar; } else { next; @@ -1891,8 +1895,8 @@ sub disconnect $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op"))); } - # get rid of any PC16/17/19/21s - eph_del_regex("^PC(?:1[679]|21).*$call"); + # get rid of any PC16/17/19 + eph_del_regex("^PC1[679]*$call"); # do routing stuff, remove me from routing table my $node = Route::Node::get($call); @@ -1903,7 +1907,7 @@ sub disconnect # and all my ephemera as well for (@rout) { my $c = $_->call; - eph_del_regex("^PC(?:1[679]|21).*$c"); + eph_del_regex("^PC1[679].*$c"); } } @@ -1917,7 +1921,7 @@ sub disconnect } # and the ephemera - eph_del_regex("^PC(?:1[679]|21).*$k"); + eph_del_regex("^PC1[679].*$k"); } # unbusy and stop and outgoing mail