[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.69, Mon Oct 2 02:59:47 2006 UTC revision 1.70, Mon Oct 2 04:41:46 2006 UTC
# Line 1988  Line 1988 
1988              # Convert the destination to a real tracing destination.              # Convert the destination to a real tracing destination.
1989              # temp directory.              # temp directory.
1990              $dest = EmergencyTracingDest($ip, $dest);              $dest = EmergencyTracingDest($ip, $dest);
1991                warn "Tracing will be to $dest.\n";
1992              # Insure Tracer is specified.              # Insure Tracer is specified.
1993              my %moduleHash = map { $_ => 1 } @tracing;              my %moduleHash = map { $_ => 1 } @tracing;
1994              $moduleHash{Tracer} = 1;              $moduleHash{Tracer} = 1;
# Line 2165  Line 2166 
2166    
2167  C<< my $ip = EmergencyIP($cgi); >>  C<< my $ip = EmergencyIP($cgi); >>
2168    
2169  Return the IP address to be used for emergency tracing. If at smoe point we need  Return the IP address to be used for emergency tracing. In actual fact, this is not an
2170  to change the way we compute the IP address, or we decide to use something else,  IP address but a session ID stored in a cookie. It used to be an IP address, but those
2171  all we need to do is change this method.  are too fluid.
2172    
2173  =over 4  =over 4
2174    
# Line 2186  Line 2187 
2187  sub EmergencyIP {  sub EmergencyIP {
2188      # Get the parameters.      # Get the parameters.
2189      my ($cgi) = @_;      my ($cgi) = @_;
2190        # Look for a cookie.
2191        my $retVal = $cgi->cookie('IP');
2192        # If no cookie, return the remote host address. This will probably not
2193        # work, but that's okay, since the lack of a cookie means the
2194        # tracing is not turned on.
2195        $retVal = $cgi->remote_host() if ! $retVal;
2196      # Return the result.      # Return the result.
2197      return $cgi->remote_addr();      return $retVal;
2198  }  }
2199    
2200    

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3