From: djk Date: Fri, 19 Nov 1999 01:25:44 +0000 (+0000) Subject: prevent self pinging X-Git-Tag: R_1_35~19 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=aedd7de39e1fd743e05ff2fb9fb286a616bb50b3;p=spider.git prevent self pinging altered no of pings to take into account to 6 from 10 --- diff --git a/cmd/ping.pl b/cmd/ping.pl index 1d75a826..9447b67b 100644 --- a/cmd/ping.pl +++ b/cmd/ping.pl @@ -16,6 +16,9 @@ return (1, $self->msg('e5')) if $self->priv < 1; # is there a call? return (1, $self->msg('e6')) if !$call; +# is it me? +return (1, $self->msg('pinge1')) if $call eq $main::mycall; + # can we see it? Is it a node? my $noderef = DXCluster->get_exact($call); $noderef = DXChannel->get($call) unless $noderef; diff --git a/perl/DXProt.pm b/perl/DXProt.pm index b4ff5f65..486cfa95 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -718,7 +718,7 @@ sub normal if ($tochan) { $tochan->nopings(3); # pump up the timer push @{$tochan->pingtime}, $t; - shift @{$tochan->pingtime} if @{$tochan->pingtime} > 10; + shift @{$tochan->pingtime} if @{$tochan->pingtime} > 6; my $st; for (@{$tochan->pingtime}) { $st += $_; diff --git a/perl/Messages b/perl/Messages index 6a49c2af..570e4e75 100644 --- a/perl/Messages +++ b/perl/Messages @@ -119,6 +119,7 @@ package DXM; password => 'Password set or changed for $_[0]', pingo => 'Ping Started to $_[0]', pingi => 'Ping Returned from $_[0] $_[1] (Ave $_[2]) secs', + pinge1 => 'Cannot ping yourself!', pr => '$_[0] de $main::mycall $main::cldate $main::ztime >', pr2 => '($_[0]) de $main::mycall $main::cldate $main::ztime >', priv => 'Privilege level changed on $_[0]',