From: wessels <> Date: Fri, 6 Feb 1998 13:44:31 +0000 (+0000) Subject: - removed snmp_config_file option (not used) X-Git-Tag: SQUID_3_0_PRE1~4150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f511ab6ffed51608f1b5218a8fcbc3eca9095b60;p=thirdparty%2Fsquid.git - removed snmp_config_file option (not used) - added aclDumpTimeSpec() --- diff --git a/src/acl.cc b/src/acl.cc index 200e777c70..eee5fcadc1 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.134 1998/02/06 00:48:59 wessels Exp $ + * $Id: acl.cc,v 1.135 1998/02/06 06:44:31 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -2086,11 +2086,37 @@ aclDumpDomainList(void *data) #endif } static wordlist * -aclDumpTimeSpec(void *data) -{ - wordlist *w = xcalloc(1, sizeof(wordlist)); - w->key = xstrdup("UNIMPLEMENTED"); - return w; +aclDumpTimeSpec(acl_time_data *t) +{ +struct _acl_time_data { + int weekbits; + int start; + int stop; + acl_time_data *next; +}; + wordlist *W = NULL; + wordlist **T = &W; + wordlist *w; + char buf[128]; + while (t != NULL) { + w = xcalloc(1, sizeof(wordlist)); + snprintf(buf, 128, "%c%c%c%c%c%c%c %02d:%02d-%02d:%02d", + t->weekbits & ACL_SUNDAY ? 'S' : '-', + t->weekbits & ACL_MONDAY ? 'M' : '-', + t->weekbits & ACL_TUESDAY ? 'T' : '-', + t->weekbits & ACL_WEDNESDAY ? 'W' : '-', + t->weekbits & ACL_THURSDAY ? 'H' : '-', + t->weekbits & ACL_FRIDAY ? 'F' : '-', + t->weekbits & ACL_SATURDAY ? 'A' : '-', + t->start / 60, + t->start % 60, + t->stop / 60, + t->stop % 60); + w->key = xstrdup(buf); + *T = w; + T = &w->next; + t = t->next; + } static wordlist * aclDumpRegexList(void *data) diff --git a/src/cf.data.pre b/src/cf.data.pre index 39f02bdafb..d5d942202d 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1982,17 +1982,6 @@ DOC_START command line option. DOC_END -NAME: snmp_config_file -TYPE: string -LOC: Config.Snmp.configFile -DEFAULT: @DEFAULT_SNMP_CONF@ -IFDEF: SQUID_SNMP -DOC_START - SNMP is configured by a file in the same format as the - CMU-snmpd config file. This tag should contain a path to this - file. -DOC_END - NAME: snmp_do_queueing TYPE: onoff LOC: Config.Snmp.do_queueing diff --git a/src/squid.h b/src/squid.h index 8e8c83f64a..98719fdb13 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.156 1998/02/05 20:53:38 wessels Exp $ + * $Id: squid.h,v 1.157 1998/02/06 06:44:34 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -352,5 +352,6 @@ struct rusage { #define free + #define calloc + #define sprintf + +#define strdup + #endif /* SQUID_H */