From dea6cbc282b2c101672139c9369af8c9bba7122e Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 3 Sep 2001 14:06:17 +0000 Subject: [PATCH] force route to always give the local channel if available --- perl/Route.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) { -- 2.43.0