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