From: wessels <> Date: Mon, 14 Jul 1997 10:27:37 +0000 (+0000) Subject: fill in some missing cf functions X-Git-Tag: SQUID_3_0_PRE1~4902 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1273d501153738370dae6a8a940711a14d56477b;p=thirdparty%2Fsquid.git fill in some missing cf functions --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 087d93bf13..5f43ebbc64 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.200 1997/07/07 05:29:39 wessels Exp $ + * $Id: cache_cf.cc,v 1.201 1997/07/14 04:27:37 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -423,7 +423,17 @@ parse_cachedir(struct _cacheSwap *swap) static void free_cachedir(struct _cacheSwap *swap) { - assert(0); + SwapDir *s; + int i; + for (i = 0; in_configured; i++) { + s = swap->swapDirs+i; + xfree(s->path); + filemapFreeMemory(s->map); + } + safe_free(swap->swapDirs); + swap->swapDirs = NULL; + swap->n_allocated = 0; + swap->n_configured = 0; } static void @@ -518,7 +528,12 @@ parse_cachemgrpasswd(cachemgr_passwd **head) static void free_cachemgrpasswd(cachemgr_passwd **head) { - assert(0); + cachemgr_passwd *p; + while ((p = *head)) { + *head = p->next; + xfree(p->passwd); + xfree(p); + } } @@ -534,13 +549,24 @@ parse_denyinfo(struct _acl_deny_info_list **var) aclParseDenyInfoLine(var); } -static void -free_denyinfo(acl_deny_info_list **head) -{ - assert(0); +void +free_denyinfo(acl_deny_info_list **list) +{ + struct _acl_deny_info_list *a = NULL; + struct _acl_deny_info_list *a_next = NULL; + struct _acl_name_list *l = NULL; + struct _acl_name_list *l_next = NULL; + for (a = *list; a; a = a_next) { + for (l = a->acl_list; l; l = l_next) { + l_next = l->next; + safe_free(l); + } + a_next = a->next; + safe_free(a); + } + *list = NULL; } - static void parse_peeracl(void) { diff --git a/src/cf.data.pre b/src/cf.data.pre index e7bca35711..a955a8d0e2 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -30,7 +30,7 @@ DOC_END NAME: mcast_groups TYPE: wordlist LOC: Config.mcast_group_list -DEFAULT: NULL +DEFAULT: none DOC_START This tag specifies a list of multicast groups which your server should join to receive multicasted ICP requests. @@ -109,7 +109,7 @@ DOC_END NAME: cache_peer cache_host TYPE: cache_peer -DEFAULT: NULL +DEFAULT: none LOC: Config.peers DOC_START To specify other caches in a hierarchy, use the format: @@ -309,7 +309,7 @@ DOC_END NAME: hierarchy_stoplist TYPE: wordlist -DEFAULT: NULL +DEFAULT: none LOC: Config.hierarchy_stoplist DOC_START A list of words which, if found in a URL, cause the object to @@ -325,7 +325,7 @@ DOC_END NAME: cache_stoplist TYPE: wordlist -DEFAULT: NULL +DEFAULT: none LOC: Config.cache_stoplist DOC_START A list of words which, if found in a URL, cause the object to @@ -342,7 +342,7 @@ DOC_END NAME: cache_stoplist_pattern TYPE: regexlist LOC: Config.cache_stop_relist -DEFAULT: NULL +DEFAULT: none DOC_START Just like 'cache_stoplist' but you can use regular expressions instead of simple string matching. There is no default. @@ -534,7 +534,7 @@ DOC_END NAME: cache_swap_log TYPE: string LOC: Config.Log.swap -DEFAULT: NULL +DEFAULT: none DOC_START Location for the cache "swap log." This log file holds the metadata of objects saved on disk. It is used to rebuild the @@ -810,7 +810,7 @@ DOC_END #----------------------------------------------------------------------------- NAME: wais_relay_host TYPE: string -DEFAULT: NULL +DEFAULT: none LOC: Config.Wais.relayHost DOC_NONE @@ -842,7 +842,7 @@ DOC_END NAME: refresh_pattern TYPE: refreshpattern LOC: Config.Refresh -DEFAULT: NONE +DEFAULT: none DOC_START usage: refresh_pattern regex min percent max @@ -1247,13 +1247,13 @@ DOC_END NAME: cache_effective_user TYPE: string -DEFAULT: NONE +DEFAULT: none LOC: Config.effectiveUser DOC_NONE NAME: cache_effective_group TYPE: string -DEFAULT: NONE +DEFAULT: none LOC: Config.effectiveGroup DOC_START If the cache is run as root, it will change its effective/real @@ -1462,7 +1462,7 @@ DOC_END NAME: ssl_proxy TYPE: cache_peer LOC: Config.sslProxy -DEFAULT: NULL +DEFAULT: none DOC_START Specify a hostname and port number where all SSL requests should be forwarded to. @@ -1480,7 +1480,7 @@ DOC_END NAME: passthrough_proxy TYPE: cache_peer LOC: Config.passProxy -DEFAULT: NULL +DEFAULT: none DOC_START Specify a hostname and port number where all non-GET (i.e. POST, PUT) requests should be forwarded to. @@ -1498,13 +1498,13 @@ DOC_END NAME: proxy_auth_passwd TYPE: string LOC: Config.proxyAuth.File -DEFAULT: NULL +DEFAULT: none DOC_NONE NAME: proxy_auth_ignore TYPE: regexlist LOC: Config.proxyAuth.IgnoreDomains -DEFAULT: NULL +DEFAULT: none DOC_START 'passwd_file' is an apache-style file of passwords for authenticated proxy access Looks like user:password, with the diff --git a/src/cf_gen.cc b/src/cf_gen.cc index a34f9f6302..fa3bb1be41 100644 --- a/src/cf_gen.cc +++ b/src/cf_gen.cc @@ -1,5 +1,5 @@ /* - * $Id: cf_gen.cc,v 1.4 1997/07/07 05:29:41 wessels Exp $ + * $Id: cf_gen.cc,v 1.5 1997/07/14 04:27:38 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Max Okumoto @@ -290,6 +290,7 @@ gen_default(Entry * head, FILE * fp) "void\n" "default_all(void)\n" "{\n" + "\tcfg_filename = \"Default Configuration\";\n" ); for (entry = head; entry != NULL; entry = entry->next) { assert(entry->name); @@ -312,6 +313,7 @@ gen_default(Entry * head, FILE * fp) entry->default_value); } } + fprintf(fp, "\tcfg_filename = NULL;\n"); fprintf(fp, "}\n\n"); return rc; } @@ -327,7 +329,7 @@ gen_parse(Entry * head, FILE * fp) "{\n" "\tint\tresult = 1;\n" "\tchar\t*token;\n" - "\n" + "\tdebug(0,10)(\"parse_line: %%s\\n\", buff);\n" "\tif ((token = strtok(buff, w_space)) == NULL) {\n" "\t\t/* ignore empty lines */\n" );