Go to the documentation of this file.
20 #define ACL_SUNDAY 0x01
21 #define ACL_MONDAY 0x02
22 #define ACL_TUESDAY 0x04
23 #define ACL_WEDNESDAY 0x08
24 #define ACL_THURSDAY 0x10
25 #define ACL_FRIDAY 0x20
26 #define ACL_SATURDAY 0x40
27 #define ACL_ALLWEEK 0x7F
28 #define ACL_WEEKDAYS 0x3E
41 static time_t last_when = 0;
46 if (when != last_when) {
48 memcpy(&tm, localtime(&when),
sizeof(
struct tm));
51 t = (time_t) (tm.tm_hour * 60 + tm.tm_min);
55 debugs(28, 3,
"aclMatchTime: checking " << t <<
" in " <<
56 data->
start <<
"-" << data->
stop <<
", weekbits=" <<
74 while (t !=
nullptr) {
76 s.
Printf(
"%c%c%c%c%c%c%c %02d:%02d-%02d:%02d",
96 long parsed_weekbits = 0;
98 for (Tail = &
next; *Tail; Tail = &((*Tail)->next));
104 if (*t < '0' || *t >
'9') {
156 if ((sscanf(t,
"%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) || (!((h1 >= 0 && h1 < 24) && ((h2 >= 0 && h2 < 24) || (h2 == 24 && m2 == 0)) && (m1 >= 0 && m1 < 60) && (m2 >= 0 && m2 < 60)))) {
166 if ((parsed_weekbits == 0) && (
start == 0) && (
stop == 0))
171 q->
start = h1 * 60 + m1;
173 q->
stop = h2 * 60 + m2;
199 if (parsed_weekbits) {
203 q->
start = 0 * 60 + 0;
205 q->
stop = 24 * 60 + 0;
void push_back(char)
Append a single character. The character may be NUL (\0).
static char * strtokFile()
std::list< SBuf > SBufList
SBufList dump() const override
SBuf & Printf(const char *fmt,...) PRINTF_FORMAT_ARG2
AsHex< Integer > asHex(const Integer n)
a helper to ease AsHex object creation
bool empty() const override
bool match(time_t) override
const char * cfg_filename
char config_input_line[BUFSIZ]
#define debugs(SECTION, LEVEL, CONTENT)