From: minima Date: Sat, 21 Jan 2006 17:54:04 +0000 (+0000) Subject: do a better job with 'u=' and 'o-' X-Git-Tag: 1.54~138 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=5a3a431137bc8eacba130cdb8aa6292371ca685a do a better job with 'u=' and 'o-' --- 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))