]> dxcluster.org Git - spider.git/commitdiff
fix ping handling better
authorminima <minima>
Wed, 11 Jan 2006 22:14:56 +0000 (22:14 +0000)
committerminima <minima>
Wed, 11 Jan 2006 22:14:56 +0000 (22:14 +0000)
perl/DXXml/Ping.pm

index f2620e6b8eb6ada1abd5497cff19e5b3f0a7b635..1e7aea6fb85d219be60ee3fceadf87313256043b 100644 (file)
@@ -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) {