On Tue, Nov 05, 2002 at 08:17:07PM -0500, Rob Mangiafico wrote:
> Is all we have to do to patch the Razor2 timeout issue with the alarm 
> being reset is to apply the cvs changes for the files Dns.pm and 
> Reporter.pm that deal with the alarm resetting code? I think those are the 
> only changes needed, but I wanted to be sure.

That should take care of it.  If you're there patching the Razor2 code,
you might also want to patch for the environment fix (Razor 2.20 causes
DCC and Pyzor to stop functioning unless you've set *_path in the
SA config).

I've attached both patches. :)

-- 
Randomly Generated Tagline:
I'm a white male, aged 18 to 49.  Everyone listens to me!  No matter
 how dumb my suggestions are.
 
                -- Homer Simpson
                   Lisa vs. Malibu Stacy
diff -b -w -u -d -r1.67 -r1.68
--- Dns.pm      26 Sep 2002 17:15:00 -0000      1.67
+++ Dns.pm      16 Oct 2002 00:21:49 -0000      1.68
@@ -390,6 +390,12 @@
         my $objects = $rc->prepare_objects( \@msg )
           or die "error in prepare_objects";
         $rc->get_server_info() or die $rc->errprefix("checkit");
+
+       # let's reset the alarm since get_server_info() calls
+       # nextserver() which calls discover() which very likely will
+       # reset the alarm for us ... how polite.  :(  
+       alarm $timeout;
+
         my $sigs = $rc->compute_sigs($objects)
           or die "error in compute_sigs";
 

diff -b -w -u -d -r1.39 -r1.40
--- Reporter.pm 8 Oct 2002 11:40:22 -0000       1.39
+++ Reporter.pm 16 Oct 2002 00:21:50 -0000      1.40
@@ -156,6 +156,12 @@
         my $objects = $rc->prepare_objects( \@msg )
           or adie ("error in prepare_objects");
         $rc->get_server_info() or adie $rc->errprefix("reportit");
+
+       # let's reset the alarm since get_server_info() calls
+       # nextserver() which calls discover() which very likely will
+       # reset the alarm for us ... how polite.  :(  
+       alarm $timeout;
+
         my $sigs = $rc->compute_sigs($objects)
           or adie ("error in compute_sigs");
diff -b -w -u -d -r1.58.2.11 -r1.58.2.12
--- Dns.pm      27 Sep 2002 20:40:32 -0000      1.58.2.11
+++ Dns.pm      21 Oct 2002 21:49:00 -0000      1.58.2.12
@@ -365,6 +365,7 @@
 
     eval {
       local ($^W) = 0;    # argh, warnings in Razor
+      local %ENV;
 
       require Razor2::Client::Agent;
 

diff -b -w -u -d -r1.32.2.4 -r1.32.2.5
--- Reporter.pm 8 Oct 2002 11:40:25 -0000       1.32.2.4
+++ Reporter.pm 21 Oct 2002 21:49:00 -0000      1.32.2.5
@@ -126,6 +126,7 @@
   if ( !$@ ) {
     eval {
       local ($^W) = 0;    # argh, warnings in Razor
+      local %ENV;
 
       local $SIG{ALRM} = sub { die "alarm\n" };
       alarm $timeout;

Attachment: msg09943/pgp00000.pgp
Description: PGP signature

Reply via email to