/*
* Compare the current time to a range.
- * Hmm... it would save work, and probably be better,
- * if we were passed the REQUEST data structure, so we
- * could use it's 'timestamp' element. That way, we could
- * do the comparison against when the packet came in, not now,
- * and have one less system call to do.
*/
static int timecmp(void *instance,
REQUEST *req UNUSED,
check_pairs = check_pairs;
reply_pairs = reply_pairs;
- if (timestr_match((char *)check->strvalue, time(NULL)) >= 0) {
+ if (timestr_match((char *)check->strvalue,
+ req ? req->timestamp : time(NULL)) >= 0) {
return 0;
}
return -1;