From: minima Date: Mon, 3 Sep 2001 14:06:17 +0000 (+0000) Subject: force route to always give the local channel if available X-Git-Tag: R_1_48~60 X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=dea6cbc282b2c101672139c9369af8c9bba7122e force route to always give the local channel if available --- diff --git a/perl/Route.pm b/perl/Route.pm index 7276c697..ee84c150 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -274,6 +274,7 @@ sub alldxchan my $self = shift; my @dxchan; # dbg("Trying node $self->{call}") if isdbg('routech'); + my $dxchan = DXChannel->get($self->{call}); push @dxchan, $dxchan if $dxchan; @@ -301,12 +302,16 @@ sub alldxchan sub dxchan { my $self = shift; + + # ALWAYS return the locally connected channel if present; + my $dxchan = DXChannel->get($self->call); + return $dxchan if $dxchan; + my @dxchan = $self->alldxchan; return undef unless @dxchan; # determine the minimum ping channel my $minping = 99999999; - my $dxchan; foreach my $dxc (@dxchan) { my $p = $dxc->pingave; if (defined $p && $p < $minping) {