fix an ordering problem with node checking
authorminima <minima>
Mon, 1 Oct 2001 12:55:04 +0000 (12:55 +0000)
committerminima <minima>
Mon, 1 Oct 2001 12:55:04 +0000 (12:55 +0000)
perl/DXProt.pm

index f8e2b4b99ee9d0c85c1f1a8d75880fde8f5b6b0c..d6a81ec4328ff0e4d8db67eda6010474df64bca2 100644 (file)
@@ -825,20 +825,21 @@ sub normal
                                $self->disconnect;
                                return;
                        }
-                       my $node = Route::Node::get($call);
                        if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me!
-                               my $dxchan = $node->dxchan;
-                               if ($dxchan && $dxchan ne $self) {
-                                       dbg("PCPROT: PC21 from $self->{call} trying to alter locally connected $call, ignored!") if isdbg('chanerr');
-                                       return;
-                               }
-
                                if ($call eq $self->{call}) {
                                        dbg("PCPROT: Trying to disconnect myself with PC21") if isdbg('chanerr');
                                        return;
                                }
 
+                               my $node = Route::Node::get($call);
                                if ($node) {
+
+                                       my $dxchan = $node->dxchan;
+                                       if ($dxchan && $dxchan ne $self) {
+                                               dbg("PCPROT: PC21 from $self->{call} trying to alter locally connected $call, ignored!") if isdbg('chanerr');
+                                               return;
+                                       }
+
                                        # input filter it
                                        return unless $self->in_filter_route($node);