-const char parsers_rcs[] = "$Id: parsers.c,v 1.69 2006/09/06 16:25:51 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.70 2006/09/08 12:06:34 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
*
* Revisions :
* $Log: parsers.c,v $
+ * Revision 1.70 2006/09/08 12:06:34 fabiankeil
+ * Have hide-if-modified-since interpret the random
+ * range value as minutes instead of hours. Allows
+ * more fine-grained configuration.
+ *
* Revision 1.69 2006/09/06 16:25:51 fabiankeil
* Always have parse_header_time return a pointer
* that actual makes sense, even though we currently
else
{
rtime = strtol(newval, &endptr, 0);
- if(rtime < 0)
- {
- rtime *= -1;
- negative = 1;
- }
if(rtime)
{
log_error(LOG_LEVEL_HEADER, "Randomizing: %s (random range: %d minut%s)",
*header, rtime, (rtime == 1 || rtime == -1) ? "e": "es");
+ if(rtime < 0)
+ {
+ rtime *= -1;
+ negative = 1;
+ }
rtime *= 60;
rtime = pick_from_range(rtime);
}
log_error(LOG_LEVEL_ERROR, "Random range is 0. Assuming time transformation test.",
*header);
}
- tm += rtime;
+ tm += rtime * (negative ? -1 : 1);
#ifdef HAVE_GMTIME_R
timeptr = gmtime_r(&tm, &gmt);
#elif OSX_DARWIN