X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=92a36d1ee826b192f8c699e247c33755a9e7b16a;hb=cd5b993f99b52d3c3c51779e9ea1fa150232225e;hp=bc27395b209944be8341a8749fa4438a939ccd90;hpb=f4901c535bed1793d405e63137d3cf37e0fa135f;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index bc27395b..92a36d1e 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -65,7 +65,7 @@ $badnode = new DXHash "badnode"; $last10 = $last_pc50 = time; $ann_to_talk = 1; $eph_restime = 60; -$eph_info_restime = 60*60; +$eph_info_restime = 18*60*60; $eph_pc15_restime = 6*60; $eph_pc34_restime = 30; $pingint = 5*60; @@ -134,7 +134,7 @@ $pc92_find_timeout = 30; # maximum time to wait for a reply undef, undef, undef, # pc60 - undef, + [ qw(i f m d t m c c a h) ], # pc61 undef, undef, undef, @@ -205,6 +205,8 @@ sub check return $i unless $_[$i] =~ /^[012]\d[012345]\dZ$/; } elsif ($act eq 'l') { return $i unless $_[$i] =~ /^[A-Z]$/; + } elsif ($act eq 'a') { + return $i unless is_ipaddr($_[$i]); } } return 0; @@ -269,7 +271,7 @@ sub new my @rout = $ref->delete; $self->route_pc21($main::mycall, undef, @rout) if @rout; } - $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall; + $main::routeroot->add($call, '5000', Route::here(1), $self->{conn}->peerhost) if $call ne $main::mycall; return $self; } @@ -284,7 +286,7 @@ sub start my $user = $self->{user}; # log it - my $host = $self->{conn}->{peerhost}; + my $host = $self->{conn}->peerhost; $host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport}; $host ||= "unknown"; @@ -294,7 +296,7 @@ sub start $self->{consort} = $line; $self->{outbound} = $sort eq 'O'; my $priv = $user->priv; - $priv = $user->priv(1) unless $priv; + $priv = $user->priv(1) unless defined $priv; $self->{priv} = $priv; # other clusters can always be 'normal' users $self->{lang} = $user->lang || 'en'; $self->{isolate} = $user->{isolate}; @@ -544,14 +546,22 @@ sub send_dx_spot my $line = shift; my @dxchan = DXChannel::get_all(); my $dxchan; + my $pc11; # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { next if $dxchan == $main::me; next if $dxchan == $self && $self->is_node; - next if $line =~ /PC61/ && !$dxchan->is_spider && !$dxchan->is_user; - $dxchan->dx_spot($line, $self->{isolate}, @_, $self->{call}); + if ($line =~ /PC61/ && !($dxchan->is_spider || $dxchan->is_user)) { + unless ($pc11) { + my @f = split /\^/, $line; + $pc11 = join '^', 'PC11', @f[1..7,9]; + } + $dxchan->dx_spot($pc11, $self->{isolate}, @_, $self->{call}); + } else { + $dxchan->dx_spot($line, $self->{isolate}, @_, $self->{call}); + } } }