From: minima Date: Wed, 11 Jan 2006 22:14:56 +0000 (+0000) Subject: fix ping handling better X-Git-Tag: 1.53~84 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=7555c945f91caaf7a4d7deb8a24bea616f426503;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) {