From: minima Date: Wed, 11 Jan 2006 22:14:56 +0000 (+0000) Subject: fix ping handling better X-Git-Tag: R_1_52~28 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=17dd4968e05851f152c4bfbfae4df928c1228b2e;p=spider.git fix ping handling better --- diff --git a/perl/DXXml/Ping.pm b/perl/DXXml/Ping.pm index f2620e6b..1e7aea6f 100644 --- a/perl/DXXml/Ping.pm +++ b/perl/DXXml/Ping.pm @@ -63,7 +63,7 @@ sub add my $ref = $pings{$to} || []; my $r = {}; my $self = DXXml::Ping->new(to=>$to, '-hirestime'=>[ gettimeofday ], s=>'1'); - $self->{u} = $from unless $from eq $main::mycall; + $self->{u} = $from; $self->{'-via'} = $via if $via && DXChannel::get($via); $self->{o} = $main::mycall; $self->{id} = $self->nextid; @@ -98,7 +98,7 @@ sub handle_ping_reply my $tochan = DXChannel::get($from); while (@$ref) { my $r = shift @$ref; - my $dxchan = DXChannel::get($r->{to}); + my $dxchan = DXChannel::get($r->{u}); next unless $dxchan; my $t = tv_interval($r->{'-hirestime'}, [ gettimeofday ]); if ($dxchan->is_user) {