]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
misc changes, but still in nonworking state
authorwessels <>
Mon, 14 Jul 1997 11:57:51 +0000 (11:57 +0000)
committerwessels <>
Mon, 14 Jul 1997 11:57:51 +0000 (11:57 +0000)
src/cache_cf.cc
src/cf.data.pre
src/comm.cc
src/debug.cc
src/peer_select.cc
src/tools.cc

index 5f43ebbc64fb5bd6c2ebfcc648479c1b331e256d..cd2b122fd170ee7268fe55892c5f9299b5d97531 100644 (file)
@@ -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
index a955a8d0e2fc18f99450530fef6001f55f2ce433..3eb41fcee4add84c156c5541cd0fe30da057f258 100644 (file)
@@ -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.
index 77a9f98ab6f20dba67f0e27fadbfae08ea08b597..2e44e7e3e04eb08a8901da2bcba8ee82e3df4729 100644 (file)
@@ -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;
index bddc14c807aa6191fc90cf4933fb3e7363b57f90..f0b5e431ab8791f63683aad07196b1e71d2e1edc 100644 (file)
@@ -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
 
 static char *debug_log_file = NULL;
 static char *accessLogTime _PARAMS((time_t));
-extern int opt_debug_stderr;
 
 #ifdef __STDC__
 void
index f3e56ad8e05a6433f69a0c031eede23161db617b..d8229ca0ee72d054efe2302521280a1c70c45e07 100644 (file)
@@ -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);
 }
 
index 84aa833c56e4573a1759f404518a7050740c4b59..d4eb6745d05b5d82e96f5577fdf1bdc686bff8a9 100644 (file)
@@ -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);