[interchange-cvs] interchange - heins modified lib/Vend/Session.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Tue Jul 6 02:19:43 EDT 2004
User: heins
Date: 2004-07-06 06:19:42 GMT
Modified: lib/Vend Session.pm
Log:
* Carl Bailey noticed that the -M _ test was testing since start of the
IC daemon, which doesn't make sense in PreFork mode. This makes the
grace check against the current time.
Revision Changes Path
2.19 +5 -4 interchange/lib/Vend/Session.pm
rev 2.19, prev_rev 2.18
Index: Session.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Session.pm,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -r2.18 -r2.19
--- Session.pm 5 Jul 2004 22:04:34 -0000 2.18
+++ Session.pm 6 Jul 2004 06:19:41 -0000 2.19
@@ -1,6 +1,6 @@
# Vend::Session - Interchange session routines
#
-# $Id: Session.pm,v 2.18 2004/07/05 22:04:34 mheins Exp $
+# $Id: Session.pm,v 2.19 2004/07/06 06:19:41 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -27,7 +27,7 @@
require Exporter;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.18 $, 10);
+$VERSION = substr(q$Revision: 2.19 $, 10);
@ISA = qw(Exporter);
@@ -203,9 +203,10 @@
my $fn = Vend::Util::get_filename($ip, 2, 1, $dir);
if(-f $fn) {
my $grace = $Vend::Cfg->{Limit}{robot_expire} || 1;
- my $mtime = -M _;
+ my @st = stat(_);
+ my $mtime = (time() - $st[9]) / 86400;
if($mtime > $grace) {
- ::logDebug("ip $ip allowed back in due to '$mtime' < '$grace'");
+ ::logDebug("ip $ip allowed back in due to '$mtime' < '$grace' days");
unlink $fn;
}
}
More information about the interchange-cvs
mailing list