From caa1689fa47268bb655b16fb21e6531e50f5c3e8 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 24 Jan 2006 12:20:51 +0000 Subject: [PATCH] get alternate pinging working properly at half pingint --- perl/DXXml.pm | 1 - perl/DXXml/Ping.pm | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/perl/DXXml.pm b/perl/DXXml.pm index 280d19ce..b9904101 100644 --- a/perl/DXXml.pm +++ b/perl/DXXml.pm @@ -156,7 +156,6 @@ sub process DXXml::Ping::add($main::me, $dxchan->call); $dxchan->{nopings} -= 1; $dxchan->{lastping} = $t; - $dxchan->{lastping} += $dxchan->{pingint} / 2 unless @{$dxchan->{pingtime}}; } } } diff --git a/perl/DXXml/Ping.pm b/perl/DXXml/Ping.pm index e02b61f8..59c8ff3e 100644 --- a/perl/DXXml/Ping.pm +++ b/perl/DXXml/Ping.pm @@ -38,6 +38,9 @@ sub handle_input ot=>$self->{t} ); $dxchan->send($rep->toxml); + if ($dxchan->{outgoing} && abs($dxchan->{lastping} - $main::systime) < 15) { + $dxchan->{lastping} += $dxchan->{pingint} / 2; + } } else { handle_ping_reply($dxchan, $self->{o}, $self->{ot}, $self->{oid}); } -- 2.43.0