]> dxcluster.org Git - spider.git/commitdiff
fix the nasty feature in perl 5.6 with my $ref = $foo if $bar for
authorwr3d <wr3d>
Sun, 13 Mar 2005 17:15:36 +0000 (17:15 +0000)
committerwr3d <wr3d>
Sun, 13 Mar 2005 17:15:36 +0000 (17:15 +0000)
pings.

perl/DXProt.pm
perl/Thingy.pm
perl/Thingy/Ping.pm

index 2bfd66865c6eac1e2e6808e2bab7e2c423b4ebc0..ec395d207b174459118d637179ed402cd8c481a8 100644 (file)
@@ -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;
-#                      }
+                       }
                }
        }
 
index 5d7909cca930df91cf19e3a45710a0caee0bd9a7..afc2129b913641eaaaf641330781de873bc535cd 100644 (file)
@@ -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;
 }
index ec9ce73d1b5b6b208abaea184b2fe3925aecd04c..de295c556c939909dbe062793842867e9942ba2a 100644 (file)
@@ -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 ]);