[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.71, Mon Oct 2 06:34:57 2006 UTC
# Line 2165  Line 2165 
2165    
2166  C<< my $ip = EmergencyIP($cgi); >>  C<< my $ip = EmergencyIP($cgi); >>
2167    
2168  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
2169  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
2170  all we need to do is change this method.  are too fluid.
2171    
2172  =over 4  =over 4
2173    
# Line 2186  Line 2186 
2186  sub EmergencyIP {  sub EmergencyIP {
2187      # Get the parameters.      # Get the parameters.
2188      my ($cgi) = @_;      my ($cgi) = @_;
2189        # Look for a cookie.
2190        my $retVal = $cgi->cookie('IP');
2191        # If no cookie, return the remote host address. This will probably not
2192        # work, but that's okay, since the lack of a cookie means the
2193        # tracing is not turned on.
2194        $retVal = $cgi->remote_host() if ! $retVal;
2195      # Return the result.      # Return the result.
2196      return $cgi->remote_addr();      return $retVal;
2197  }  }
2198    
2199    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3