From: Dirk Koopman Date: Tue, 24 Jun 2008 23:32:56 +0000 (+0100) Subject: allow multiple PC93 if same hopcount X-Git-Tag: 1.56~76 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=2255cfd184e50c01e1b655961a59ae050147aa79 allow multiple PC93 if same hopcount --- diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index b3f03222..166d5643 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -1913,18 +1913,29 @@ sub handle_93 } # convert to PC10 talks where appropriate - # just go for the "best" one for now (rather than broadcast) - $dxchan = $ref->dxchan; - - # check it... - if (ref $dxchan && $dxchan->isa('DXChannel')) { - if ($dxchan->{do_pc9x}) { - $dxchan->send($line); + # PC93 capable nodes of the same hop count all get a copy + # if there is a PC10 node then it will get a copy and that + # will be it. Hopefully such a node will not figure highly + # in the route list, unless it is local, 'cos it don't issue PC92s! + my @routes = Route::findroutes($to); + my $lasthops; + foreach my $r (@routes) { + $lasthops = $r->[0] unless defined $lasthops; + if ($r->[0] == $lasthops) { + $dxchan = $r->[1]; + if (ref $dxchan && $dxchan->isa('DXChannel')) { + if ($dxchan->{do_pc9x}) { + $dxchan->send($line); + } else { + $dxchan->talk($from, $to, $via, $text, $onode); + last; + } + } else { + dbg("ERROR: $to -> $dxchan is not a DXChannel! (convert to pc10)"); + } } else { - $dxchan->talk($from, $to, $via, $text, $onode); + last; } - } else { - dbg("ERROR: $to -> $dxchan is not a DXChannel! (convert to pc10)"); } return; diff --git a/perl/Version.pm b/perl/Version.pm index 2a847d5c..88693a9f 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.55'; $subversion = '0'; -$build = '18'; +$build = '20'; 1;