From: wessels <> Date: Mon, 14 Jul 1997 11:57:51 +0000 (+0000) Subject: misc changes, but still in nonworking state X-Git-Tag: SQUID_3_0_PRE1~4901 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62607543b840af726220429b840f8b878fa5fe81;p=thirdparty%2Fsquid.git misc changes, but still in nonworking state --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 5f43ebbc64..cd2b122fd1 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.201 1997/07/14 04:27:37 wessels Exp $ + * $Id: cache_cf.cc,v 1.202 1997/07/14 05:57:51 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -418,6 +418,7 @@ parse_cachedir(struct _cacheSwap *swap) tmp->read_only = readonly; tmp->map = file_map_create(MAX_FILES_PER_DIR); tmp->swaplog_fd = -1; + swap->n_configured++; } static void diff --git a/src/cf.data.pre b/src/cf.data.pre index a955a8d0e2..3eb41fcee4 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -784,7 +784,7 @@ DOC_END NAME: redirect_program TYPE: pathname_stat LOC: Config.Program.redirect -DEFAULT: /bin/false +DEFAULT: none DOC_START Specify the location of the executable for the URL redirector. Currently, you must provide your own redirector program. diff --git a/src/comm.cc b/src/comm.cc index 77a9f98ab6..2e44e7e3e0 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.173 1997/07/14 03:33:35 wessels Exp $ + * $Id: comm.cc,v 1.174 1997/07/14 05:57:53 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -578,7 +578,7 @@ comm_close(int fd) if (!fde->open) return; assert(fde->type != FD_FILE); - fde->open = 0; + memset(fde, '\0', sizeof(fde)); CommWriteStateCallbackAndFree(fd, COMM_ERROR); commCallCloseHandlers(fd); fd_close(fd); /* update fdstat */ @@ -857,7 +857,6 @@ comm_poll(time_t sec) aioCheckCallbacks(); #endif for (;;) { - poll_time = sec > 0 ? 1000 : 0; num = poll(pfds, nfds, poll_time); select_loops++; if (num >= 0) @@ -1072,7 +1071,7 @@ commSetSelect(int fd, unsigned int type, PF * handler, void *client_data, time_t fde *fde; assert(fd >= 0); fde = &fd_table[fd]; - debug(5, 5) ("commSetSelect: FD %d, handler=%p, data=%p\n", fd, handler, client_data); + debug(5, 5) ("commSetSelect: FD %d, type=%d, handler=%p, data=%p\n", fd, type, handler, client_data); if (type & COMM_SELECT_READ) { fde->read_handler = handler; fde->read_data = client_data; diff --git a/src/debug.cc b/src/debug.cc index bddc14c807..f0b5e431ab 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,5 @@ /* - * $Id: debug.cc,v 1.46 1997/07/14 03:33:36 wessels Exp $ + * $Id: debug.cc,v 1.47 1997/07/14 05:57:54 wessels Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -107,7 +107,6 @@ static char *debug_log_file = NULL; static char *accessLogTime _PARAMS((time_t)); -extern int opt_debug_stderr; #ifdef __STDC__ void diff --git a/src/peer_select.cc b/src/peer_select.cc index f3e56ad8e0..d8229ca0ee 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.17 1997/07/07 05:29:51 wessels Exp $ + * $Id: peer_select.cc,v 1.18 1997/07/14 05:57:55 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -166,7 +166,7 @@ peerCheckAlwaysDirectDone(int answer, void *data) ps_state *psstate = data; psstate->acl_checklist = NULL; debug(44, 3) ("peerCheckAlwaysDirectDone: %d\n", answer); - psstate->always_direct = answer ? 1 : -1; + psstate->always_direct = answer ? -1 : 1; peerSelectFoo(psstate); } diff --git a/src/tools.cc b/src/tools.cc index 84aa833c56..d4eb6745d0 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.112 1997/07/14 03:33:41 wessels Exp $ + * $Id: tools.cc,v 1.113 1997/07/14 05:57:55 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -383,6 +383,8 @@ fatal_common(const char *message) syslog(LOG_ALERT, "%s", message); #endif fprintf(debug_log, "FATAL: %s\n", message); + if (opt_debug_stderr) + fprintf(stderr, "FATAL: %s\n", message); fprintf(debug_log, "Squid Cache (Version %s): Terminated abnormally.\n", version_string); fflush(debug_log);