X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FInvestigate.pm;h=e1cb9b2801c46e72d41b4527563689b0b98b2e1a;hb=eb4918707eb5fa97782c3c15aafdbc8cce44d446;hp=d59a57b5a1ba17f976d2fe47660366076510e400;hpb=23d5848190b73200389fdfc2291e3453b3b91b15;p=spider.git diff --git a/perl/Investigate.pm b/perl/Investigate.pm index d59a57b5..e1cb9b28 100644 --- a/perl/Investigate.pm +++ b/perl/Investigate.pm @@ -47,6 +47,7 @@ my $lastping = 0; # last ping done pcxx => '0,Stored PCProt,parray', ); +my %via = (); sub new { @@ -87,6 +88,7 @@ sub handle_ping my $self = shift; dbg("Investigate: ping received for $self->{call} via $self->{via}") if isdbg('investigate'); if ($self->{state} eq 'waitping') { + $via{$self->{via}} = 0; # cue up next ping on this interface delete $list{"$self->{via},$self->{call}"}; my $user = DXUser->get_current($self->{via}); if ($user) { @@ -120,11 +122,13 @@ sub process { while (my ($k, $v) = each %list) { if ($v->{state} eq 'start') { - if ($main::systime > $lastping+$pingint) { + my $via = $via{$v->{via}} || 0; + if ($main::systime > $via+$pingint) { DXProt::addping($main::mycall, $v->{call}, $v->{via}); $v->{start} = $lastping = $main::systime; dbg("Investigate: ping sent to $v->{call} via $v->{via}") if isdbg('investigate'); $v->chgstate('waitping'); + $via{$v->{via}} = $main::systime; } } elsif ($v->{state} eq 'waitping') { if ($main::systime > $v->{start} + $maxpingwait) {