From 5a3a431137bc8eacba130cdb8aa6292371ca685a Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 21 Jan 2006 17:54:04 +0000 Subject: [PATCH] do a better job with 'u=' and 'o-' --- perl/DXXml/Ping.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perl/DXXml/Ping.pm b/perl/DXXml/Ping.pm index d70d6e9a..e02b61f8 100644 --- a/perl/DXXml/Ping.pm +++ b/perl/DXXml/Ping.pm @@ -97,7 +97,7 @@ sub handle_ping_reply my $tochan = DXChannel::get($from); while (@$ref) { my $r = shift @$ref; - my $dxchan = DXChannel::get($r->{u}); + my $dxchan = DXChannel::get($r->{o}); next unless $dxchan; my $t = tv_interval($r->{'-hirestime'}, [ gettimeofday ]); if ($dxchan->is_node) { @@ -120,7 +120,8 @@ sub handle_ping_reply $tochan->{nopings} = $nopings; # pump up the timer } _handle_believe($from, $fromdxchan->{call}); - } elsif ($dxchan->is_user) { + } + if (exists $r->{u} && ($dxchan = DXChannel::get($r->{u})) && $dxchan->is_user) { my $s = sprintf "%.2f", $t; my $ave = sprintf "%.2f", $tochan ? ($tochan->{pingave} || $t) : $t; $dxchan->send($dxchan->msg('pingi', $from, $s, $ave)) -- 2.43.0