fix missing under test
[spider.git] / perl / DXProt.pm
index 35f91fefb301a56d9334dc59b0f2cd4024550757..612e59b6c93e62fbefa1a52a6dc4823ed5e001a1 100644 (file)
@@ -786,18 +786,24 @@ sub handle_16
                # input filter if required
                return unless $self->in_filter_route($parent);
        }
+
+       # is he under the control of the new protocol?
+       if ($parent && $parent->np) {
+               dbg("PCPROT: $ncall aranea node, ignored") if isdbg('chanerr');
+               return;
+       }
                
-               my $i;
+       my $i;
        my @rout;
-               for ($i = 2; $i < $#_; $i++) {
-                       my ($call, $conf, $here) = $_[$i] =~ /^(\S+) (\S) (\d)/o;
-                       next unless $call && $conf && defined $here && is_callsign($call);
-                       next if $call eq $main::mycall;
-                       
-                       eph_del_regex("^PC17\\^$call\\^$ncall");
-                               
+       for ($i = 2; $i < $#_; $i++) {
+               my ($call, $conf, $here) = $_[$i] =~ /^(\S+) (\S) (\d)/o;
+               next unless $call && $conf && defined $here && is_callsign($call);
+               next if $call eq $main::mycall;
+               
+               eph_del_regex("^PC17\\^$call\\^$ncall");
+               
                $conf = $conf eq '*';
-
+               
                # reject this if we think it is a node already
                my $r = Route::Node::get($call);
                my $u = DXUser->get_current($call) unless $r;
@@ -808,19 +814,19 @@ sub handle_16
                
                $r = Route::User::get($call);
                my $flags = Route::here($here)|Route::conf($conf);
-
+               
                if ($r) {
                        my $au = $r->addparent($parent);                                        
                        if ($r->flags != $flags) {
                                $r->flags($flags);
                                $au = $r;
-               }
+                       }
                        push @rout, $r if $au;
-       } else {
+               } else {
                        push @rout, $parent->add_user($call, $flags);
                }
                
-                               
+               
                # add this station to the user database, if required
                $call =~ s/-\d+$//o;    # remove ssid for users
                my $user = DXUser->get_current($call);
@@ -883,6 +889,12 @@ sub handle_17
                return;
        }
 
+       # is he under the control of the new protocol?
+       if ($parent && $parent->np) {
+               dbg("PCPROT: $ncall aranea node, ignored") if isdbg('chanerr');
+               return;
+       }
+
        # input filter if required and then remove user if present
        if ($parent) {
 #              return unless $self->in_filter_route($parent);  
@@ -1036,6 +1048,11 @@ sub handle_19
                my $r = Route::Node::get($call);
                my $flags = Route::here($here)|Route::conf($conf);
 
+               # is he under the control of the new protocol?
+               if ($r && $r->np) {
+                       dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
+                       next;
+               }
                # modify the routing table if it is in it, otherwise store it in the pc19list for now
                if ($r) {
                        my $ar;
@@ -1094,6 +1111,10 @@ sub handle_20
        $self->send(pc22());
        $self->state('normal');
        $self->{lastping} = 0;
+       my $thing = Thingy::Rt->new(user=>$self->{call});
+       my $nref = Route::Node::get($self->{call});
+       $thing->broadcast if $thing->copy_pc16_data($nref);
+       $self->lastcf($main::systime);
 }
                
 # delete a cluster from the list
@@ -1152,6 +1173,12 @@ sub handle_21
                                                
                                # input filter it
                                return unless $self->in_filter_route($node);
+
+                               # is he under the control of the new protocol?
+                               if ($node->np) {
+                                       dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
+                                       return;
+                               }
                                                
                                # routing objects
                                push @rout, $node->del($parent);
@@ -1174,6 +1201,10 @@ sub handle_22
        my $origin = shift;
        $self->state('normal');
        $self->{lastping} = 0;
+       my $thing = Thingy::Rt->new(user=>$self->{call});
+       my $nref = Route::Node::get($self->{call});
+       $thing->broadcast if $thing->copy_pc16_data($nref);
+       $self->lastcf($main::systime);
 }
                                
 # WWV info