X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=9888380adcad3fe9d1e8fb7a86dd4019e90327df;hb=6975c4b4c8b210af067efab767bc1656786f70f2;hp=c14c9bbefdc64879402412bac78f826e2a6ff374;hpb=6ea05be3ca5b4857bb319782c408d5784658ec20;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index c14c9bbe..9888380a 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -703,6 +703,7 @@ sub normal # it's a reply, look in the ping list for this one my $ref = $pings{$field[2]}; if ($ref) { + my $tochan = DXChannel->get($field[2]); while (@$ref) { my $r = shift @$ref; my $dxchan = DXChannel->get($r->{call}); @@ -710,9 +711,9 @@ sub normal my $t = tv_interval($r->{t}, [ gettimeofday ]); if ($dxchan->is_user) { my $s = sprintf "%.2f", $t; - $dxchan->send($dxchan->msg('pingi', $field[2], $s)) + my $ave = $tochan->pingave if $tochan; + $dxchan->send($dxchan->msg('pingi', $field[2], $s, $ave)) } elsif ($dxchan->is_ak1a) { - my $tochan = DXChannel->get($field[2]); if ($tochan) { $tochan->nopings(3); # pump up the timer $tochan->{pingtime} += $t;