--------------------- PatchSet 647 Date: 2003/03/08 20:25:08 Author: serassio Branch: nt Tag: (none) Log: Clean of windows source code Members: src/comm.cc:1.19.2.2->1.19.2.3 src/dns.cc:1.5.2.1->1.5.2.2 src/dns_internal.cc:1.7.2.3->1.7.2.4 src/errorpage.cc:1.11.2.3->1.11.2.4 src/main.cc:1.15.2.2->1.15.2.3 src/refresh.cc:1.5.2.1->1.5.2.2 src/stat.cc:1.10.2.2->1.10.2.3 Index: squid3/src/comm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.cc,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -u -r1.19.2.2 -r1.19.2.3 --- squid3/src/comm.cc 8 Mar 2003 10:17:23 -0000 1.19.2.2 +++ squid3/src/comm.cc 8 Mar 2003 20:25:08 -0000 1.19.2.3 @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.19.2.2 2003/03/08 10:17:23 serassio Exp $ + * $Id: comm.cc,v 1.19.2.3 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1825,7 +1825,8 @@ } void -commSetCloseOnExec(int fd) { +commSetCloseOnExec(int fd) +{ #ifdef FD_CLOEXEC int flags; int dummy = 0; @@ -1845,7 +1846,8 @@ #ifdef TCP_NODELAY static void -commSetTcpNoDelay(int fd) { +commSetTcpNoDelay(int fd) +{ int on = 1; if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0) @@ -1858,7 +1860,8 @@ void -comm_init(void) { +comm_init(void) +{ fd_table =(fde *) xcalloc(Squid_MaxFD, sizeof(fde)); fdd_table = (fd_debug_t *)xcalloc(Squid_MaxFD, sizeof(fd_debug_t)); fdc_table = (fdc_t *)xcalloc(Squid_MaxFD, sizeof(fdc_t)); @@ -1876,7 +1879,8 @@ /* Write to FD. */ static void -commHandleWrite(int fd, void *data) { +commHandleWrite(int fd, void *data) +{ CommWriteStateData *state = (CommWriteStateData *)data; int len = 0; int nleft; @@ -1947,7 +1951,8 @@ * free_func is used to free the passed buffer when the write has completed. */ void -comm_old_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) { +comm_old_write(int fd, const char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) +{ CommWriteStateData *state = fd_table[fd].rwstate; assert(!fd_table[fd].flags.closing); @@ -1973,7 +1978,8 @@ /* a wrapper around comm_write to allow for MemBuf to be comm_written in a snap */ void -comm_old_write_mbuf(int fd, MemBuf mb, CWCB * handler, void *handler_data) { +comm_old_write_mbuf(int fd, MemBuf mb, CWCB * handler, void *handler_data) +{ comm_old_write(fd, mb.buf, mb.size, handler, handler_data, memBufFreeFunc(&mb)); } @@ -1983,7 +1989,8 @@ * like to use it. */ int -ignoreErrno(int ierrno) { +ignoreErrno(int ierrno) +{ switch (ierrno) { case EINPROGRESS: @@ -2012,7 +2019,8 @@ } void -commCloseAllSockets(void) { +commCloseAllSockets(void) +{ int fd; fde *F = NULL; @@ -2045,7 +2053,8 @@ } void -checkTimeouts(void) { +checkTimeouts(void) +{ int fd; fde *F = NULL; PF *callback; @@ -2084,7 +2093,8 @@ * accept()ed. */ int -comm_listen(int sock) { +comm_listen(int sock) +{ int x; if ((x = listen(sock, Squid_MaxFD >> 2)) < 0) { @@ -2103,7 +2113,8 @@ * to dupe itself and fob off an accept()ed connection */ static void -comm_accept_try(int fd, void *data) { +comm_accept_try(int fd, void *data) +{ int newfd; fdc_t *Fc; int count; @@ -2164,7 +2175,8 @@ * this isn't very optimal and should be revisited at a later date. */ void -comm_accept(int fd, IOACB *handler, void *handler_data) { +comm_accept(int fd, IOACB *handler, void *handler_data) +{ fdc_t *Fc; assert(fd_table[fd].flags.open == 1); @@ -2188,7 +2200,8 @@ #endif } -void CommIO::Initialise() { +void CommIO::Initialise() +{ /* Initialize done pipe signal */ int DonePipe[2]; pipe(DonePipe); @@ -2208,19 +2221,22 @@ int CommIO::DoneReadFD = -1; void -CommIO::FlushPipe() { +CommIO::FlushPipe() +{ char buf[256]; read(DoneReadFD, buf, sizeof(buf)); } void -CommIO::NULLFDHandler(int fd, void *data) { +CommIO::NULLFDHandler(int fd, void *data) +{ FlushPipe(); commSetSelect(fd, COMM_SELECT_READ, NULLFDHandler, NULL, 0); } void -CommIO::ResetNotifications() { +CommIO::ResetNotifications() +{ if (DoneSignalled) { FlushPipe(); DoneSignalled = false; Index: squid3/src/dns.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/dns.cc,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- squid3/src/dns.cc 25 Feb 2003 02:49:08 -0000 1.5.2.1 +++ squid3/src/dns.cc 8 Mar 2003 20:25:08 -0000 1.5.2.2 @@ -1,6 +1,6 @@ /* - * $Id: dns.cc,v 1.5.2.1 2003/02/25 02:49:08 hno Exp $ + * $Id: dns.cc,v 1.5.2.2 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -37,8 +37,8 @@ #include "Store.h" /* MS VisualStudio Projects are monolitich, so we need the following - #ifdef to include the internal DNS code from compile process when - using internal DNS. + #if to include the external DNS code in compile process when + using external DNS. */ #if USE_DNSSERVERS static helper *dnsservers = NULL; Index: squid3/src/dns_internal.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/dns_internal.cc,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.4 diff -u -r1.7.2.3 -r1.7.2.4 --- squid3/src/dns_internal.cc 8 Mar 2003 10:17:23 -0000 1.7.2.3 +++ squid3/src/dns_internal.cc 8 Mar 2003 20:25:08 -0000 1.7.2.4 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.7.2.3 2003/03/08 10:17:23 serassio Exp $ + * $Id: dns_internal.cc,v 1.7.2.4 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -39,7 +39,7 @@ /* MS VisualStudio Projects are monolitich, so we need the following #ifndef to exclude the internal DNS code from compile process when - using External DNS process. + using external DNS process. */ #ifndef USE_DNSSERVERS #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) Index: squid3/src/errorpage.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/errorpage.cc,v retrieving revision 1.11.2.3 retrieving revision 1.11.2.4 diff -u -r1.11.2.3 -r1.11.2.4 --- squid3/src/errorpage.cc 2 Mar 2003 10:56:36 -0000 1.11.2.3 +++ squid3/src/errorpage.cc 8 Mar 2003 20:25:08 -0000 1.11.2.4 @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.11.2.3 2003/03/02 10:56:36 serassio Exp $ + * $Id: errorpage.cc,v 1.11.2.4 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -217,7 +217,6 @@ MemBuf textbuf; snprintf(path, sizeof(path), "%s/%s", dir, page_name); - fd = file_open(path, O_RDONLY | O_TEXT); if (fd < 0) { Index: squid3/src/main.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/main.cc,v retrieving revision 1.15.2.2 retrieving revision 1.15.2.3 diff -u -r1.15.2.2 -r1.15.2.3 --- squid3/src/main.cc 1 Mar 2003 16:18:31 -0000 1.15.2.2 +++ squid3/src/main.cc 8 Mar 2003 20:25:08 -0000 1.15.2.3 @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.15.2.2 2003/03/01 16:18:31 serassio Exp $ + * $Id: main.cc,v 1.15.2.3 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -335,13 +335,10 @@ #if HAVE_SYSLOG opt_syslog_enable = 1; - break; - #else fatal("Logging to syslog not available on this platform"); - /* NOTREACHED */ #endif @@ -383,7 +380,8 @@ /* ARGSUSED */ void -rotate_logs(int sig) { +rotate_logs(int sig) +{ do_rotate = 1; #ifndef _SQUID_MSWIN_ #if !HAVE_SIGACTION @@ -395,7 +393,8 @@ /* ARGSUSED */ void -reconfigure(int sig) { +reconfigure(int sig) +{ do_reconfigure = 1; #ifndef _SQUID_MSWIN_ #if !HAVE_SIGACTION @@ -406,7 +405,8 @@ } void -shut_down(int sig) { +shut_down(int sig) +{ do_shutdown = sig == SIGINT ? -1 : 1; #ifndef _SQUID_MSWIN_ #ifdef KILL_PARENT_OPT @@ -429,7 +429,8 @@ } static void -serverConnectionsOpen(void) { +serverConnectionsOpen(void) +{ clientOpenListenSockets(); icpConnectionsOpen(); #if USE_HTCP @@ -462,7 +463,8 @@ } void -serverConnectionsClose(void) { +serverConnectionsClose(void) +{ assert(shutting_down || reconfiguring); clientHttpConnectionsClose(); icpConnectionShutdown(); @@ -485,7 +487,8 @@ } static void -mainReconfigure(void) { +mainReconfigure(void) +{ debug(1, 1) ("Restarting Squid Cache (version %s)...\n", version_string); reconfiguring = 1; /* Already called serverConnectionsClose and ipcacheShutdownServers() */ @@ -555,7 +558,8 @@ } static void -mainRotate(void) { +mainRotate(void) +{ icmpClose(); #ifdef _SQUID_MSWIN_ @@ -596,7 +600,8 @@ } static void -setEffectiveUser(void) { +setEffectiveUser(void) +{ leave_suid(); /* Run as non privilegied user */ #ifdef _SQUID_OS2_ @@ -613,7 +618,8 @@ } static void -mainSetCwd(void) { +mainSetCwd(void) +{ char pathbuf[MAXPATHLEN]; if (Config.coredump_dir) { @@ -640,7 +646,8 @@ #endif static void -mainInitialize(void) { +mainInitialize(void) +{ /* chroot if configured to run inside chroot */ if (Config.chroot_dir && chroot(Config.chroot_dir)) { @@ -847,20 +854,21 @@ #else int main(int argc, char **argv) -#endif { +#endif +{ int errcount = 0; -int n; /* # of GC'd objects */ -mode_t oldmask; + int n; /* # of GC'd objects */ + mode_t oldmask; #if HAVE_SBRK -sbrk_start = sbrk(0); + sbrk_start = sbrk(0); #endif -debug_log = stderr; + debug_log = stderr; -if (FD_SETSIZE < Squid_MaxFD) - Squid_MaxFD = FD_SETSIZE; + if (FD_SETSIZE < Squid_MaxFD) + Squid_MaxFD = FD_SETSIZE; #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) #ifdef USE_WIN32_SERVICE @@ -877,305 +885,308 @@ return WIN32_init_err; } #endif + #endif -/* call mallopt() before anything else */ + /* call mallopt() before anything else */ #if HAVE_MALLOPT #ifdef M_GRAIN -/* Round up all sizes to a multiple of this */ -mallopt(M_GRAIN, 16); + /* Round up all sizes to a multiple of this */ + mallopt(M_GRAIN, 16); #endif #ifdef M_MXFAST -/* biggest size that is considered a small block */ -mallopt(M_MXFAST, 256); + /* biggest size that is considered a small block */ + mallopt(M_MXFAST, 256); #endif #ifdef M_NBLKS -/* allocate this many small blocks at once */ -mallopt(M_NLBLKS, 32); + /* allocate this many small blocks at once */ + mallopt(M_NLBLKS, 32); #endif #endif /* HAVE_MALLOPT */ -/* - * The plan here is to set the umask to 007 (deny others for - * read,write,execute), but only if the umask is not already - * set. Unfortunately, there is no way to get the current - * umask value without setting it. - */ -oldmask = umask(S_IRWXO); + /* + * The plan here is to set the umask to 007 (deny others for + * read,write,execute), but only if the umask is not already + * set. Unfortunately, there is no way to get the current + * umask value without setting it. + */ + oldmask = umask(S_IRWXO); -if (oldmask) - umask(oldmask); + if (oldmask) + umask(oldmask); -memset(&local_addr, '\0', sizeof(struct in_addr)); + memset(&local_addr, '\0', sizeof(struct in_addr)); -safe_inet_addr(localhost, &local_addr); + safe_inet_addr(localhost, &local_addr); -memset(&any_addr, '\0', sizeof(struct in_addr)); + memset(&any_addr, '\0', sizeof(struct in_addr)); -safe_inet_addr("0.0.0.0", &any_addr); + safe_inet_addr("0.0.0.0", &any_addr); -memset(&no_addr, '\0', sizeof(struct in_addr)); + memset(&no_addr, '\0', sizeof(struct in_addr)); -safe_inet_addr("255.255.255.255", &no_addr); + safe_inet_addr("255.255.255.255", &no_addr); -squid_srandom(time(NULL)); + squid_srandom(time(NULL)); -getCurrentTime(); + getCurrentTime(); -squid_start = current_time; + squid_start = current_time; -failure_notify = fatal_dump; + failure_notify = fatal_dump; #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) -WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); + WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); #endif -mainParseOptions(argc, argv); + mainParseOptions(argc, argv); #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) -if (opt_install_service) { - WIN32_InstallService(); - return; -} + if (opt_install_service) { + WIN32_InstallService(); + return; + } -if (opt_remove_service) { - WIN32_RemoveService(); - return; -} + if (opt_remove_service) { + WIN32_RemoveService(); + return; + } -if (opt_command_line) { - WIN32_SetServiceCommandLine(); - return; -} + if (opt_command_line) { + WIN32_SetServiceCommandLine(); + return; + } #endif -/* parse configuration file - * note: in "normal" case this used to be called from mainInitialize() */ -{ - int parse_err; + /* parse configuration file + * note: in "normal" case this used to be called from mainInitialize() */ + { + int parse_err; - if (!ConfigFile) - ConfigFile = xstrdup(DefaultConfigFile); + if (!ConfigFile) + ConfigFile = xstrdup(DefaultConfigFile); - assert(!configured_once); + assert(!configured_once); #if USE_LEAKFINDER - leakInit(); + leakInit(); #endif - Mem::Init(); + Mem::Init(); - cbdataInit(); + cbdataInit(); - eventInit(); /* eventInit() is required for config parsing */ + eventInit(); /* eventInit() is required for config parsing */ - storeFsInit(); /* required for config parsing */ + storeFsInit(); /* required for config parsing */ - authenticateSchemeInit(); /* required for config parsign */ + authenticateSchemeInit(); /* required for config parsign */ - parse_err = parseConfigFile(ConfigFile); + parse_err = parseConfigFile(ConfigFile); - if (opt_parse_cfg_only) + if (opt_parse_cfg_only) #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) - return; + return; #else - return parse_err; + return parse_err; #endif -} -if (-1 == opt_send_signal) - if (checkRunningPid()) - exit(1); + } + if (-1 == opt_send_signal) + if (checkRunningPid()) + exit(1); #if TEST_ACCESS -comm_init(); + comm_init(); -comm_select_init(); + comm_select_init(); -mainInitialize(); + mainInitialize(); -test_access(); + test_access(); -return 0; + return 0; #endif -/* send signal to running copy and exit */ -if (opt_send_signal != -1) { - /* chroot if configured to run inside chroot */ + /* send signal to running copy and exit */ + if (opt_send_signal != -1) { + /* chroot if configured to run inside chroot */ - if (Config.chroot_dir && chroot(Config.chroot_dir)) { - fatal("failed to chroot"); - } + if (Config.chroot_dir && chroot(Config.chroot_dir)) { + fatal("failed to chroot"); + } - sendSignal(); - /* NOTREACHED */ -} + sendSignal(); + /* NOTREACHED */ + } -if (opt_create_swap_dirs) { - /* chroot if configured to run inside chroot */ + if (opt_create_swap_dirs) { + /* chroot if configured to run inside chroot */ - if (Config.chroot_dir && chroot(Config.chroot_dir)) { - fatal("failed to chroot"); - } + if (Config.chroot_dir && chroot(Config.chroot_dir)) { + fatal("failed to chroot"); + } - setEffectiveUser(); - debug(0, 0) ("Creating Swap Directories\n"); - storeCreateSwapDirectories(); + setEffectiveUser(); + debug(0, 0) ("Creating Swap Directories\n"); + storeCreateSwapDirectories(); #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) - return; + return; #else - return 0; + return 0; #endif -} + } -if (!opt_no_daemon) - watch_child(argv); + if (!opt_no_daemon) + watch_child(argv); -setMaxFD(); + setMaxFD(); -if (opt_catch_signals) - for (n = Squid_MaxFD; n > 2; n--) - close(n); + if (opt_catch_signals) + for (n = Squid_MaxFD; n > 2; n--) + close(n); -/* init comm module */ -comm_init(); + /* init comm module */ + comm_init(); -comm_select_init(); + comm_select_init(); -if (opt_no_daemon) { - /* we have to init fdstat here. */ - fd_open(0, FD_LOG, "stdin"); - fd_open(1, FD_LOG, "stdout"); - fd_open(2, FD_LOG, "stderr"); -} + if (opt_no_daemon) { + /* we have to init fdstat here. */ + fd_open(0, FD_LOG, "stdin"); + fd_open(1, FD_LOG, "stdout"); + fd_open(2, FD_LOG, "stderr"); + } #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) -WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); + WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); #endif -mainInitialize(); + mainInitialize(); #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) -WIN32_svcstatusupdate(SERVICE_RUNNING, 0); + WIN32_svcstatusupdate(SERVICE_RUNNING, 0); #endif -/* main loop */ -for (;;) { - if (do_reconfigure) { - mainReconfigure(); - do_reconfigure = 0; + /* main loop */ + + for (;;) { + if (do_reconfigure) { + mainReconfigure(); + do_reconfigure = 0; #if defined(_SQUID_MSWIN_) && defined(_DEBUG) - } else if (do_debug) { - do_debug = 0; - __asm int 3; + } else if (do_debug) { + do_debug = 0; + __asm int 3; #endif - } else if (do_rotate) { - mainRotate(); - do_rotate = 0; - } else if (do_shutdown) { - time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0; - debug(1, 1) ("Preparing for shutdown after %d requests\n", - statCounter.client_http.requests); - debug(1, 1) ("Waiting %d seconds for active connections to finish\n", - (int) wait); - do_shutdown = 0; - shutting_down = 1; + } else if (do_rotate) { + mainRotate(); + do_rotate = 0; + } else if (do_shutdown) { + time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0; + debug(1, 1) ("Preparing for shutdown after %d requests\n", + statCounter.client_http.requests); + debug(1, 1) ("Waiting %d seconds for active connections to finish\n", + (int) wait); + do_shutdown = 0; + shutting_down = 1; #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) - WIN32_svcstatusupdate(SERVICE_STOP_PENDING, (wait + 1) * 1000); + WIN32_svcstatusupdate(SERVICE_STOP_PENDING, (wait + 1) * 1000); #endif - serverConnectionsClose(); + serverConnectionsClose(); #if USE_DNSSERVERS - dnsShutdown(); + dnsShutdown(); #else - idnsShutdown(); + idnsShutdown(); #endif - redirectShutdown(); - externalAclShutdown(); - eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1); - } + redirectShutdown(); + externalAclShutdown(); + eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1); + } - eventRun(); - int loop_delay = eventNextTime(); + eventRun(); + int loop_delay = eventNextTime(); - if (loop_delay < 0) - loop_delay = 0; + if (loop_delay < 0) + loop_delay = 0; - /* Attempt any pending storedir IO */ - storeDirCallback(); + /* Attempt any pending storedir IO */ + storeDirCallback(); - comm_calliocallback(); + comm_calliocallback(); - switch (comm_select(loop_delay)) { + switch (comm_select(loop_delay)) { - case COMM_OK: - errcount = 0; /* reset if successful */ - break; + case COMM_OK: + errcount = 0; /* reset if successful */ + break; - case COMM_ERROR: - errcount++; - debug(1, 0) ("Select loop Error. Retry %d\n", errcount); + case COMM_ERROR: + errcount++; + debug(1, 0) ("Select loop Error. Retry %d\n", errcount); - if (errcount == 10) - fatal_dump("Select Loop failed!"); + if (errcount == 10) + fatal_dump("Select Loop failed!"); - break; + break; - case COMM_TIMEOUT: - break; + case COMM_TIMEOUT: + break; - case COMM_SHUTDOWN: - SquidShutdown(NULL); + case COMM_SHUTDOWN: + SquidShutdown(NULL); - break; + break; - default: - fatal_dump("MAIN: Internal error -- this should never happen."); + default: + fatal_dump("MAIN: Internal error -- this should never happen."); - break; + break; + } } -} -/* NOTREACHED */ + /* NOTREACHED */ #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) return; #else -return 0; + return 0; #endif } static void -sendSignal(void) { +sendSignal(void) +{ pid_t pid; debug_log = stderr; pid = readPidFile(); @@ -1210,13 +1221,13 @@ #endif -} else { - fprintf(stderr, "%s: ERROR: No running copy\n", appname); - exit(1); -} + } else { + fprintf(stderr, "%s: ERROR: No running copy\n", appname); + exit(1); + } -/* signal successfully sent */ -exit(0); + /* signal successfully sent */ + exit(0); } #ifndef _SQUID_MSWIN_ @@ -1227,7 +1238,8 @@ * someone that Squid is (re)started. */ static void -mainStartScript(const char *prog) { +mainStartScript(const char *prog) +{ char script[SQUID_MAXPATHLEN]; char *t; size_t sl = 0; @@ -1264,7 +1276,8 @@ #endif static int -checkRunningPid(void) { +checkRunningPid(void) +{ pid_t pid; debug_log = stderr; pid = readPidFile(); @@ -1281,7 +1294,8 @@ } static void -watch_child(char *argv[]) { +watch_child(char *argv[]) +{ #ifndef _SQUID_MSWIN_ char *prog; int failcount = 0; @@ -1423,7 +1437,8 @@ } static void -SquidShutdown(void *unused) { +SquidShutdown(void *unused) +{ #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)) WIN32_svcstatusupdate(SERVICE_STOP_PENDING, 10000); #endif Index: squid3/src/refresh.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/refresh.cc,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- squid3/src/refresh.cc 25 Feb 2003 02:49:15 -0000 1.5.2.1 +++ squid3/src/refresh.cc 8 Mar 2003 20:25:08 -0000 1.5.2.2 @@ -1,6 +1,6 @@ /* - * $Id: refresh.cc,v 1.5.2.1 2003/02/25 02:49:15 hno Exp $ + * $Id: refresh.cc,v 1.5.2.2 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 22 Refresh Calculation * AUTHOR: Harvest Derived @@ -205,8 +205,7 @@ sf->lmfactor = 1; if (age >= stale_age) { - debug(22, 3) - ("STALE: age %d > stale_age %d\n", + debug(22, 3) ("STALE: age %d > stale_age %d\n", (int) age, (int) stale_age); return (age - stale_age); } else { Index: squid3/src/stat.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/stat.cc,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -u -r1.10.2.2 -r1.10.2.3 --- squid3/src/stat.cc 8 Mar 2003 10:17:24 -0000 1.10.2.2 +++ squid3/src/stat.cc 8 Mar 2003 20:25:08 -0000 1.10.2.3 @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.10.2.2 2003/03/08 10:17:24 serassio Exp $ + * $Id: stat.cc,v 1.10.2.3 2003/03/08 20:25:08 serassio Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -682,6 +682,7 @@ statMemoryAccounted() >> 10); #endif + { MemPoolGlobalStats mp_stats; memPoolGetGlobalStats(&mp_stats);