From: wessels <> Date: Fri, 19 Jul 1996 23:36:57 +0000 (+0000) Subject: change debugging for aclMatchTime() X-Git-Tag: SQUID_3_0_PRE1~6025 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bf1243941e8b741f95b34868a3219ebdadd2221;p=thirdparty%2Fsquid.git change debugging for aclMatchTime() --- diff --git a/src/acl.cc b/src/acl.cc index e76ef0a29b..f22aa0a03e 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,5 +1,5 @@ /* - * $Id: acl.cc,v 1.17 1996/07/18 20:26:59 wessels Exp $ + * $Id: acl.cc,v 1.18 1996/07/19 17:36:57 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -611,15 +611,16 @@ static int aclMatchTime(data, when) static time_t last_when = 0; static struct tm tm; time_t t; + int rc; if (when != last_when) { last_when = when; xmemcpy(&tm, localtime(&when), sizeof(struct tm)); } - debug(28, 3, "aclMatchTime: checking %d-%d, weekbits=%x\n", - data->start, data->stop, data->weekbits); - t = (time_t) (tm.tm_hour * 60 + tm.tm_min); + debug(28, 3, "aclMatchTime: checking %d in %d-%d, weekbits=%x\n", + (int) t, (int) data->start, (int) data->stop, data->weekbits); + if (t < data->start || t > data->stop) return 0; return data->weekbits & (1 << tm.tm_wday) ? 1 : 0;