added even more checking tp PC16,17 and 39
authorminima <minima>
Mon, 20 Nov 2000 15:36:58 +0000 (15:36 +0000)
committerminima <minima>
Mon, 20 Nov 2000 15:36:58 +0000 (15:36 +0000)
Changes
perl/DXProt.pm
perl/cluster.pl

diff --git a/Changes b/Changes
index 2e1489629cb7be2633a97f4a94a16ecb04f7ea05..dc742ed386851a6f98722c175e2be3b416a386e4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+20Nov00=======================================================================
+1. added even more checking to PC16,17 and 39
 19Nov00=======================================================================
 1. improve reaping code a bit more.
 2. put some extra checking in the PC16,17,19,21 code.
index 8571a2fa36d26b12c3368f61dff5532f25ba4d08..ffb9cf5bae3eaa396635b05dcc7843bc22e6790b 100644 (file)
@@ -504,7 +504,14 @@ sub normal
 #                              broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate};
                                
                        }
-                       return unless $node; # ignore if havn't seen a PC19 for this one yet
+                       if ($field[2] eq $main::mycall || $field[2] eq $main::myalias || $field[1] eq $main::myalias || $field[1] eq $main::mycall) {
+                               dbg('chan', "LOOP: trying to connect myself!");
+                               return;
+                       }
+                       unless ($node) {
+                               dbg('chan', "Node $field[1] not in config");
+                               return;
+                       }
                        unless ($node->isa('DXNode')) {
                                dbg('chan', "$field[1] is not a node");
                                return;
@@ -561,7 +568,14 @@ sub normal
                                dbg('chan', "$field[2] no PC19 yet, autovivified as node");
 #                              broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate};
                        }
-                       return unless $node;
+                       if ($field[2] eq $main::mycall || $field[2] eq $main::myalias || $field[1] eq $main::myalias || $field[1] eq $main::mycall) {
+                               dbg('chan', "LOOP: trying to disconnect me!");
+                               return;
+                       }
+                       unless ($node) {
+                               dbg('chan', "Node $field[2] not in config");
+                               return;
+                       }
                        unless ($node->isa('DXNode')) {
                                dbg('chan', "LOOP: $field[2] is not a node");
                                return;
@@ -579,6 +593,7 @@ sub normal
                                $ref->del;
                        } else {
                                dbg('chan', "$field[1] not known" );
+                               return;
                        }
                        last SWITCH;
                }
@@ -693,6 +708,9 @@ sub normal
                                        dbg('chan', "$call not in table, dropped");
                                        return;
                                }
+                       } else {
+                               dbg('chan', "I WILL NOT be disconnected!");
+                               return;
                        }
                        last SWITCH;
                }
@@ -859,7 +877,11 @@ sub normal
                }
                
                if ($pcno == 39) {              # incoming disconnect
-                       $self->disconnect(1);
+                       if ($field[1] eq $self->{call}) {
+                               $self->disconnect(1);
+                       } else {
+                               dbg('chan', "LOOP: came in on wrong channel");
+                       }
                        return;
                }
                
index e8858a0df531f2e8709e7d865b22bd4f2cfb8cd7..a126b20b8f91c7cb4efa62b1db9673f08ee10344 100755 (executable)
@@ -377,7 +377,6 @@ Spot->init();
 dbg('err', "reading in duplicate spot and WWV info ...");
 DXProt->init();
 
-
 # put in a DXCluster node for us here so we can add users and take them away
 DXNode->new($DXProt::me, $mycall, 0, 1, $DXProt::myprot_version);