From: wr3d Date: Sat, 12 Mar 2005 23:33:32 +0000 (+0000) Subject: fix DXChannel::get X-Git-Tag: R_1_52~84 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=a55714f18999ec1ac500dfcbf7f3f12cc4a96f99;p=spider.git fix DXChannel::get Fix pinging (a bit) --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index d8dad2c3..2bfd6686 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -972,6 +972,12 @@ sub handle_19 } else { next; } + } else { + if ($r->version != $ver || $r->flags != $flags) { + $r->version($ver); + $r->flags($flags); + push @rout, $r; + } } } else { @@ -1572,13 +1578,13 @@ sub process # send a ping out on this channel if ($dxchan->{pingint} && $t >= $dxchan->{pingint} + $dxchan->{lastping}) { - if ($dxchan->{nopings} <= 0) { - $dxchan->disconnect; - } else { +# if ($dxchan->{nopings} <= 0) { +# $dxchan->disconnect; +# } else { addping($main::mycall, $dxchan->call); $dxchan->{nopings} -= 1; $dxchan->{lastping} = $t; - } +# } } } diff --git a/perl/Thingy/Ping.pm b/perl/Thingy/Ping.pm index 0d005e48..ec9ce73d 100644 --- a/perl/Thingy/Ping.pm +++ b/perl/Thingy/Ping.pm @@ -118,7 +118,7 @@ sub handle # it's a reply, look in the ping list for this one my $ref = $ping{$thing->{id}} if exists $thing->{id}; - $ref ||= find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})); + $ref = find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})) unless $ref; if ($ref) { my $t = tv_interval($ref->{t}, [ gettimeofday ]); my $tochan = DXChannel::get($ref->{touser} || $ref->{group});