From: minima Date: Mon, 1 Oct 2001 12:55:04 +0000 (+0000) Subject: fix an ordering problem with node checking X-Git-Tag: R_1_49~97 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fd948e7dfd70949e959dd0a633d4e5b762d07e0;p=spider.git fix an ordering problem with node checking --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index f8e2b4b9..d6a81ec4 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -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);