From 809ac2e606559d68ff6e0580c0681fc71c6bc4b9 Mon Sep 17 00:00:00 2001 From: wr3d Date: Sun, 13 Mar 2005 17:15:36 +0000 Subject: [PATCH 1/1] fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for pings. --- perl/DXProt.pm | 8 ++++---- perl/Thingy.pm | 2 +- perl/Thingy/Ping.pm | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 2bfd6686..ec395d20 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1578,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.pm b/perl/Thingy.pm index 5d7909cc..afc2129b 100644 --- a/perl/Thingy.pm +++ b/perl/Thingy.pm @@ -218,7 +218,7 @@ sub ascii my $dd = new Data::Dumper([$thing]); $dd->Indent(0); $dd->Terse(1); - $dd->Sortkeys(1); + #$dd->Sortkeys(1); $dd->Quotekeys($] < 5.005 ? 1 : 0); return $dd->Dumpxs; } diff --git a/perl/Thingy/Ping.pm b/perl/Thingy/Ping.pm index ec9ce73d..de295c55 100644 --- a/perl/Thingy/Ping.pm +++ b/perl/Thingy/Ping.pm @@ -117,7 +117,8 @@ sub handle } else { # it's a reply, look in the ping list for this one - my $ref = $ping{$thing->{id}} if exists $thing->{id}; + my $ref; + $ref = $ping{$thing->{id}} if exists $thing->{id}; $ref = find(($thing->{user}||$thing->{origin}), ($thing->{touser}||$thing->{group})) unless $ref; if ($ref) { my $t = tv_interval($ref->{t}, [ gettimeofday ]); -- 2.43.0