diff -cr squid-1.0.beta6/ChangeLog squid-1.0.beta7/ChangeLog *** squid-1.0.beta6/ChangeLog Fri May 03 13:25:36 1996 --- squid-1.0.beta7/ChangeLog Wed May 08 20:40:48 1996 *************** *** 141,143 **** --- 141,156 ---- - Changed ftpget to only generate BASE HREF if the FTP URL does not end with '/'. + + changes to squid-1.0.beta7: + + - Fixed comm_udp_sendto continuous loop bug + - Fixed URLs-with-colon-but-no-port-number bug + - Fixed sending ICP queries for HEAD requests + - Changed 'server_list' output. Added RTT, Fetches, Hits, Misses, + and percents. + - Fixed setuid bug causing some logs to be owned by root. + - Fixed virtual host mode (-V option) + - Added read(2) instrumentation for HTTP and FTP. + - Changed neighbor initialization to continue if DNS lookup fails. + - Lint cleanup diff -cr squid-1.0.beta6/makefile.in squid-1.0.beta7/makefile.in *** squid-1.0.beta6/makefile.in Fri May 03 13:27:57 1996 --- squid-1.0.beta7/makefile.in Tue May 07 09:51:16 1996 *************** *** 1,4 **** ! # $Id: makefile.in,v 1.6.2.1 1996/05/03 20:27:57 wessels Exp $ # srcdir = @srcdir@ --- 1,4 ---- ! # $Id: makefile.in,v 1.6.2.2 1996/05/07 16:51:16 wessels Exp $ # srcdir = @srcdir@ *************** *** 15,20 **** --- 15,22 ---- exec_prefix = @exec_prefix@ SUBDIRS = lib scripts src + + noargs: all all install clean: @for dir in $(SUBDIRS); do \ diff -cr squid-1.0.beta6/include/mime_table.h squid-1.0.beta7/include/mime_table.h *** squid-1.0.beta6/include/mime_table.h Wed Feb 21 22:23:56 1996 --- squid-1.0.beta7/include/mime_table.h Wed May 08 19:41:03 1996 *************** *** 1,91 **** #define EXT_TABLE_LEN 88 ! static ext_table_entry ext_mime_table [] = { ! {"Z", "application/x-compressed", "x-compress", "binary"}, ! {"ai", "application/postscript", "8bit", "text"}, ! {"aif", "audio/x-aiff", "binary", "sound"}, ! {"aifc", "audio/x-aiff", "binary", "sound"}, ! {"aiff", "audio/x-aiff", "binary", "sound"}, ! {"au", "audio/basic", "binary", "sound"}, ! {"avi", "video/x-msvideo", "binary", "movie"}, ! {"bcpio", "application/x-bcpio", "binary", "binary"}, ! {"bin", "application/macbinary", "macbinary", "binary"}, ! {"c", "text/plain", "7bit", "text"}, ! {"cc", "text/plain", "7bit", "text"}, ! {"cdf", "application/x-netcdf", "binary", "binary"}, ! {"cpio", "application/x-cpio", "binary", "binary"}, ! {"csh", "application/x-csh", "7bit", "text"}, ! {"doc", "application/msword", "binary", "binary"}, ! {"dvi", "application/x-dvi", "binary", "binary"}, ! {"eps", "application/postscript", "8bit", "text"}, ! {"etx", "text/x-setext", "7bit", "text"}, ! {"exe", "application/octet-stream", "binary", "binary"}, ! {"f90", "text/plain", "7bit", "text"}, ! {"gif", "image/gif", "binary", "image"}, ! {"gtar", "application/x-gtar", "binary", "binary"}, ! {"gz", "application/x-gzip", "x-gzip", "binary"}, ! {"h", "text/plain", "7bit", "text"}, ! {"hdf", "application/x-hdf", "binary", "binary"}, ! {"hh", "text/plain", "7bit", "text"}, ! {"hqx", "application/mac-binhex40", "mac-binhex40", "binary"}, ! {"htm", "text/html", "8bit", "text"}, ! {"html", "text/html", "8bit", "text"}, ! {"ief", "image/ief", "binary", "image"}, ! {"jpe", "image/jpeg", "binary", "image"}, ! {"jpeg", "image/jpeg", "binary", "image"}, ! {"jpg", "image/jpeg", "binary", "image"}, ! {"latex", "application/x-latex", "8bit", "text"}, ! {"m", "text/plain", "7bit", "text"}, ! {"man", "application/x-troff-man", "7bit", "text"}, ! {"me", "application/x-troff-me", "7bit", "text"}, ! {"mif", "application/x-mif", "binary", "binary"}, ! {"mime", "www/mime", "8bit", "text"}, ! {"mov", "video/quicktime", "binary", "movie"}, ! {"movie", "video/x-sgi-movie", "binary", "movie"}, ! {"mpe", "video/mpeg", "binary", "movie"}, ! {"mpeg", "video/mpeg", "binary", "movie"}, ! {"mpg", "video/mpeg", "binary", "movie"}, ! {"ms", "application/x-troff-ms", "7bit", "text"}, ! {"msw", "application/msword", "binary", "binary"}, ! {"mwrt", "application/macwriteii", "binary", "binary"}, ! {"nc", "application/x-netcdf", "binary", "binary"}, ! {"oda", "application/oda", "binary", "binary"}, ! {"pbm", "image/x-portable-bitmap", "binary", "image"}, ! {"pdf", "application/pdf", "binary", "binary"}, ! {"pgm", "image/x-portable-graymap", "binary", "image"}, ! {"pic", "application/pict", "binary", "image"}, ! {"pict", "application/pict", "binary", "image"}, ! {"pnm", "image/x-portable-anymap", "binary", "image"}, ! {"ppm", "image/x-portable-pixmap", "binary", "image"}, ! {"ps", "application/postscript", "8bit", "text"}, ! {"qt", "video/quicktime", "binary", "movie"}, ! {"ras", "image/cmu-raster", "binary", "image"}, ! {"rgb", "image/x-rgb", "binary", "image"}, ! {"roff", "application/x-troff", "7bit", "text"}, ! {"rtf", "application/x-rtf", "7bit", "binary"}, ! {"rtx", "text/richtext", "7bit", "text"}, ! {"sh", "application/x-sh", "7bit", "text"}, ! {"shar", "application/x-shar", "8bit", "text"}, ! {"sit", "application/stuffit", "binary", "binary"}, ! {"snd", "audio/basic", "binary", "sound"}, ! {"src", "application/x-wais-source", "7bit", "text"}, ! {"sv4cpio", "application/x-sv4cpio", "binary", "binary"}, ! {"sv4crc", "application/x-sv4crc", "binary", "binary"}, ! {"t", "application/x-troff", "7bit", "text"}, ! {"tar", "application/x-tar", "binary", "binary"}, ! {"tcl", "application/x-tcl", "7bit", "text"}, ! {"tex", "application/x-tex", "8bit", "text"}, ! {"texi", "application/x-texinfo", "7bit", "text"}, ! {"texinfo", "application/x-texinfo", "7bit", "text"}, ! {"tgz", "application/x-gzip", "x-gzip", "binary"}, ! {"tif", "image/tiff", "binary", "image"}, ! {"tiff", "image/tiff", "binary", "image"}, ! {"tr", "application/x-troff", "7bit", "text"}, ! {"tsv", "text/tab-separated-values", "7bit", "text"}, ! {"txt", "text/plain", "7bit", "text"}, ! {"ustar", "application/x-ustar", "binary", "binary"}, ! {"wav", "audio/x-wav", "binary", "sound"}, ! {"xbm", "image/x-xbitmap", "binary", "image"}, ! {"xpm", "image/x-xpixmap", "binary", "image"}, ! {"xwd", "image/x-xwindowdump", "binary", "image"}, ! {"zip", "application/zip", "zip", "binary"} }; --- 1,92 ---- #define EXT_TABLE_LEN 88 ! static ext_table_entry ext_mime_table[] = ! { ! {"Z", "application/x-compressed", "x-compress", "binary"}, ! {"ai", "application/postscript", "8bit", "text"}, ! {"aif", "audio/x-aiff", "binary", "sound"}, ! {"aifc", "audio/x-aiff", "binary", "sound"}, ! {"aiff", "audio/x-aiff", "binary", "sound"}, ! {"au", "audio/basic", "binary", "sound"}, ! {"avi", "video/x-msvideo", "binary", "movie"}, ! {"bcpio", "application/x-bcpio", "binary", "binary"}, ! {"bin", "application/macbinary", "macbinary", "binary"}, ! {"c", "text/plain", "7bit", "text"}, ! {"cc", "text/plain", "7bit", "text"}, ! {"cdf", "application/x-netcdf", "binary", "binary"}, ! {"cpio", "application/x-cpio", "binary", "binary"}, ! {"csh", "application/x-csh", "7bit", "text"}, ! {"doc", "application/msword", "binary", "binary"}, ! {"dvi", "application/x-dvi", "binary", "binary"}, ! {"eps", "application/postscript", "8bit", "text"}, ! {"etx", "text/x-setext", "7bit", "text"}, ! {"exe", "application/octet-stream", "binary", "binary"}, ! {"f90", "text/plain", "7bit", "text"}, ! {"gif", "image/gif", "binary", "image"}, ! {"gtar", "application/x-gtar", "binary", "binary"}, ! {"gz", "application/x-gzip", "x-gzip", "binary"}, ! {"h", "text/plain", "7bit", "text"}, ! {"hdf", "application/x-hdf", "binary", "binary"}, ! {"hh", "text/plain", "7bit", "text"}, ! {"hqx", "application/mac-binhex40", "mac-binhex40", "binary"}, ! {"htm", "text/html", "8bit", "text"}, ! {"html", "text/html", "8bit", "text"}, ! {"ief", "image/ief", "binary", "image"}, ! {"jpe", "image/jpeg", "binary", "image"}, ! {"jpeg", "image/jpeg", "binary", "image"}, ! {"jpg", "image/jpeg", "binary", "image"}, ! {"latex", "application/x-latex", "8bit", "text"}, ! {"m", "text/plain", "7bit", "text"}, ! {"man", "application/x-troff-man", "7bit", "text"}, ! {"me", "application/x-troff-me", "7bit", "text"}, ! {"mif", "application/x-mif", "binary", "binary"}, ! {"mime", "www/mime", "8bit", "text"}, ! {"mov", "video/quicktime", "binary", "movie"}, ! {"movie", "video/x-sgi-movie", "binary", "movie"}, ! {"mpe", "video/mpeg", "binary", "movie"}, ! {"mpeg", "video/mpeg", "binary", "movie"}, ! {"mpg", "video/mpeg", "binary", "movie"}, ! {"ms", "application/x-troff-ms", "7bit", "text"}, ! {"msw", "application/msword", "binary", "binary"}, ! {"mwrt", "application/macwriteii", "binary", "binary"}, ! {"nc", "application/x-netcdf", "binary", "binary"}, ! {"oda", "application/oda", "binary", "binary"}, ! {"pbm", "image/x-portable-bitmap", "binary", "image"}, ! {"pdf", "application/pdf", "binary", "binary"}, ! {"pgm", "image/x-portable-graymap", "binary", "image"}, ! {"pic", "application/pict", "binary", "image"}, ! {"pict", "application/pict", "binary", "image"}, ! {"pnm", "image/x-portable-anymap", "binary", "image"}, ! {"ppm", "image/x-portable-pixmap", "binary", "image"}, ! {"ps", "application/postscript", "8bit", "text"}, ! {"qt", "video/quicktime", "binary", "movie"}, ! {"ras", "image/cmu-raster", "binary", "image"}, ! {"rgb", "image/x-rgb", "binary", "image"}, ! {"roff", "application/x-troff", "7bit", "text"}, ! {"rtf", "application/x-rtf", "7bit", "binary"}, ! {"rtx", "text/richtext", "7bit", "text"}, ! {"sh", "application/x-sh", "7bit", "text"}, ! {"shar", "application/x-shar", "8bit", "text"}, ! {"sit", "application/stuffit", "binary", "binary"}, ! {"snd", "audio/basic", "binary", "sound"}, ! {"src", "application/x-wais-source", "7bit", "text"}, ! {"sv4cpio", "application/x-sv4cpio", "binary", "binary"}, ! {"sv4crc", "application/x-sv4crc", "binary", "binary"}, ! {"t", "application/x-troff", "7bit", "text"}, ! {"tar", "application/x-tar", "binary", "binary"}, ! {"tcl", "application/x-tcl", "7bit", "text"}, ! {"tex", "application/x-tex", "8bit", "text"}, ! {"texi", "application/x-texinfo", "7bit", "text"}, ! {"texinfo", "application/x-texinfo", "7bit", "text"}, ! {"tgz", "application/x-gzip", "x-gzip", "binary"}, ! {"tif", "image/tiff", "binary", "image"}, ! {"tiff", "image/tiff", "binary", "image"}, ! {"tr", "application/x-troff", "7bit", "text"}, ! {"tsv", "text/tab-separated-values", "7bit", "text"}, ! {"txt", "text/plain", "7bit", "text"}, ! {"ustar", "application/x-ustar", "binary", "binary"}, ! {"wav", "audio/x-wav", "binary", "sound"}, ! {"xbm", "image/x-xbitmap", "binary", "image"}, ! {"xpm", "image/x-xpixmap", "binary", "image"}, ! {"xwd", "image/x-xwindowdump", "binary", "image"}, ! {"zip", "application/zip", "zip", "binary"} }; diff -cr squid-1.0.beta6/include/util.h squid-1.0.beta7/include/util.h *** squid-1.0.beta6/include/util.h Sat Apr 13 20:34:28 1996 --- squid-1.0.beta7/include/util.h Wed May 08 19:35:33 1996 *************** *** 1,5 **** /* ! * $Id: util.h,v 1.6 1996/04/14 03:34:28 wessels Exp $ */ #ifndef _UTIL_H_ --- 1,5 ---- /* ! * $Id: util.h,v 1.6.2.1 1996/05/09 02:35:33 wessels Exp $ */ #ifndef _UTIL_H_ *************** *** 22,48 **** #ifndef _PARAMS #if defined(__STDC__) || defined(__cplusplus) || defined(__STRICT_ANSI__) #define _PARAMS(ARGS) ARGS ! #else /* Traditional C */ ! #define _PARAMS(ARGS) () ! #endif /* __STDC__ */ ! #endif /* _PARAMS */ #ifdef NO_STRDUP ! char *strdup _PARAMS((char *)); /* Duplicate a string */ #endif ! char *xstrdup _PARAMS((char *)); /* Duplicate a string */ /* from xmalloc.c */ ! void *xmalloc _PARAMS((size_t)); /* Wrapper for malloc(3) */ void *xrealloc _PARAMS((void *, size_t)); /* Wrapper for realloc(3) */ ! void *xcalloc _PARAMS((int, size_t)); /* Wrapper for calloc(3) */ ! void xfree _PARAMS((void *)); /* Wrapper for free(3) */ ! void xxfree _PARAMS((void *)); /* Wrapper for free(3) */ ! char *xstrdup _PARAMS ((char *)); ! char *xstrerror _PARAMS(()); - char *getfullhostname _PARAMS(()); - /* from debug.c */ #ifndef MAX_DEBUG_LEVELS #define MAX_DEBUG_LEVELS 256 --- 22,47 ---- #ifndef _PARAMS #if defined(__STDC__) || defined(__cplusplus) || defined(__STRICT_ANSI__) #define _PARAMS(ARGS) ARGS ! #else /* Traditional C */ ! #define _PARAMS(ARGS) () ! #endif /* __STDC__ */ ! #endif /* _PARAMS */ #ifdef NO_STRDUP ! char *strdup _PARAMS((char *)); /* Duplicate a string */ #endif ! char *xstrdup _PARAMS((char *)); /* Duplicate a string */ /* from xmalloc.c */ ! void *xmalloc _PARAMS((size_t)); /* Wrapper for malloc(3) */ void *xrealloc _PARAMS((void *, size_t)); /* Wrapper for realloc(3) */ ! void *xcalloc _PARAMS((int, size_t)); /* Wrapper for calloc(3) */ ! void xfree _PARAMS((void *)); /* Wrapper for free(3) */ ! void xxfree _PARAMS((void *)); /* Wrapper for free(3) */ ! char *xstrdup _PARAMS((char *)); ! char *xstrerror _PARAMS((void)); ! char *getfullhostname _PARAMS((void)); /* from debug.c */ #ifndef MAX_DEBUG_LEVELS #define MAX_DEBUG_LEVELS 256 *************** *** 51,57 **** #ifndef MAIN extern int Harvest_do_debug; extern int Harvest_debug_levels[]; ! #endif /* MAIN */ #undef debug_ok_fast #if USE_NO_DEBUGGING --- 50,56 ---- #ifndef MAIN extern int Harvest_do_debug; extern int Harvest_debug_levels[]; ! #endif /* MAIN */ #undef debug_ok_fast #if USE_NO_DEBUGGING *************** *** 74,105 **** {if (debug_ok_fast((section),(level))) {Log X;}} #endif - void debug_reset _PARAMS((void)); void debug_enable _PARAMS((int, int)); void debug_disable _PARAMS((int)); void debug_flag _PARAMS((char *)); ! int debug_ok _PARAMS((int, int)); #define HOST_CACHE_TTL 3600 typedef struct _host { ! char key[SQUIDHOSTNAMELEN]; /* www.bar.com */ ! char fqdn[SQUIDHOSTNAMELEN]; /* real.bar.com */ ! char dotaddr[16]; /* 128.138.213.10 */ ! char ipaddr[4]; ! time_t last_t; /* last access of this info */ ! int n; /* # of requests for this host */ ! int addrlen; /* length of 'ipaddr', always 4 */ struct _host *next; } Host; ! extern Host *thisHost; ! void host_cache_init _PARAMS((void)); ! Host *get_host _PARAMS((char *hostname)); ! int delete_host _PARAMS((Host *h)); ! int expire_host_cache _PARAMS((time_t timeout)); ! void dump_host_cache _PARAMS((int, int)); --- 73,106 ---- {if (debug_ok_fast((section),(level))) {Log X;}} #endif void debug_enable _PARAMS((int, int)); void debug_disable _PARAMS((int)); void debug_flag _PARAMS((char *)); ! #ifdef UNUSED_CODE ! void debug_reset _PARAMS((void)); ! int debug_ok _PARAMS((int, int)); ! #endif /* UNUSED_CODE */ #define HOST_CACHE_TTL 3600 typedef struct _host { ! char key[SQUIDHOSTNAMELEN]; /* www.bar.com */ ! char fqdn[SQUIDHOSTNAMELEN]; /* real.bar.com */ ! char dotaddr[16]; /* 128.138.213.10 */ ! char ipaddr[4]; ! time_t last_t; /* last access of this info */ ! int n; /* # of requests for this host */ ! int addrlen; /* length of 'ipaddr', always 4 */ struct _host *next; } Host; ! extern Host *thisHost; ! void host_cache_init _PARAMS((void)); ! Host *get_host _PARAMS((char *hostname)); ! int delete_host _PARAMS((Host * h)); ! int expire_host_cache _PARAMS((time_t timeout)); ! void dump_host_cache _PARAMS((int, int)); *************** *** 106,121 **** char *mkhttpdlogtime _PARAMS((time_t *)); extern char *mkrfc850 _PARAMS((time_t *)); extern time_t parse_rfc850 _PARAMS((char *str)); ! extern void init_log3 _PARAMS((char *pn, FILE *a, FILE *b)); extern void debug_init(); extern void log_errno2 _PARAMS((char *, int, char *)); #if defined(__STRICT_ANSI__) ! extern void Log _PARAMS((char *, ...)); ! extern void errorlog _PARAMS((char *, ...)); #else ! extern void Log (); ! extern void errorlog (); #endif /* __STRICT_ANSI__ */ --- 107,122 ---- char *mkhttpdlogtime _PARAMS((time_t *)); extern char *mkrfc850 _PARAMS((time_t *)); extern time_t parse_rfc850 _PARAMS((char *str)); ! extern void init_log3 _PARAMS((char *pn, FILE * a, FILE * b)); extern void debug_init(); extern void log_errno2 _PARAMS((char *, int, char *)); #if defined(__STRICT_ANSI__) ! extern void Log _PARAMS((char *,...)); ! extern void errorlog _PARAMS((char *,...)); #else ! extern void Log(); ! extern void errorlog(); #endif /* __STRICT_ANSI__ */ diff -cr squid-1.0.beta6/include/version.h squid-1.0.beta7/include/version.h *** squid-1.0.beta6/include/version.h Wed May 01 15:23:16 1996 --- squid-1.0.beta7/include/version.h Tue May 07 09:51:38 1996 *************** *** 1,7 **** ! /* $Id: version.h,v 1.19.4.5 1996/05/01 22:23:16 wessels Exp $ * * SQUID_VERSION - String for version id of this distribution */ #ifndef SQUID_VERSION ! #define SQUID_VERSION "1.0.beta6" #endif --- 1,7 ---- ! /* $Id: version.h,v 1.19.4.6 1996/05/07 16:51:38 wessels Exp $ * * SQUID_VERSION - String for version id of this distribution */ #ifndef SQUID_VERSION ! #define SQUID_VERSION "1.0.beta7" #endif diff -cr squid-1.0.beta6/lib/debug.c squid-1.0.beta7/lib/debug.c *** squid-1.0.beta6/lib/debug.c Mon Mar 18 17:29:11 1996 --- squid-1.0.beta7/lib/debug.c Wed May 08 19:33:01 1996 *************** *** 1,5 **** ! /* $Id: debug.c,v 1.3 1996/03/19 01:29:11 wessels Exp $ */ #include #include #define MAIN --- 1,9 ---- ! /* $Id: debug.c,v 1.3.2.2 1996/05/09 02:33:01 wessels Exp $ */ + #include "config.h" + #include "autoconf.h" + #include "version.h" + #include #include #define MAIN *************** *** 8,13 **** --- 12,18 ---- int Harvest_debug_levels[MAX_DEBUG_LEVELS]; int Harvest_do_debug = 0; + #ifdef UNUSED_CODE /* * debug_reset() - Reset debugging routines. */ *************** *** 19,24 **** --- 24,30 ---- Harvest_debug_levels[i] = -1; Harvest_do_debug = 0; } + #endif /* UNUSED_CODE */ /* * debug_enable() - Enables debugging output for section s, level l. *************** *** 48,53 **** --- 54,60 ---- Harvest_debug_levels[s] = -1; } + #ifdef UNUSED_CODE /* * debug_ok() - Returns non-zero if the caller is debugging the * given section and level. If level is -2, then all debugging is used. *************** *** 77,82 **** --- 84,90 ---- return 0; #endif } + #endif /* UNUSED_CODE */ /* * debug_flag() - Processes a -D flag and runs debug_enable() *************** *** 132,137 **** u = strtok(t, " \t\n"); do { debug_flag(u); ! } while ((u = strtok((char *) 0, " \t\n")) != (char *) NULL); xfree(t); } --- 140,145 ---- u = strtok(t, " \t\n"); do { debug_flag(u); ! } while ((u = strtok((char *) 0, " \t\n")) != NULL); xfree(t); } diff -cr squid-1.0.beta6/lib/getfullhostname.c squid-1.0.beta7/lib/getfullhostname.c *** squid-1.0.beta6/lib/getfullhostname.c Sat Apr 13 20:25:23 1996 --- squid-1.0.beta7/lib/getfullhostname.c Tue May 07 09:50:39 1996 *************** *** 1,5 **** ! /* $Id: getfullhostname.c,v 1.4 1996/04/14 03:25:23 wessels Exp $ */ #include #include --- 1,9 ---- ! /* $Id: getfullhostname.c,v 1.4.2.1 1996/05/07 16:50:39 wessels Exp $ */ ! ! #include "config.h" ! #include "autoconf.h" ! #include "version.h" #include #include diff -cr squid-1.0.beta6/lib/host_cache.c squid-1.0.beta7/lib/host_cache.c *** squid-1.0.beta6/lib/host_cache.c Sat Apr 13 20:25:24 1996 --- squid-1.0.beta7/lib/host_cache.c Wed May 08 19:33:02 1996 *************** *** 1,5 **** - /* $Id: host_cache.c,v 1.5 1996/04/14 03:25:24 wessels Exp $ */ #include #include #include --- 1,10 ---- + /* $Id: host_cache.c,v 1.5.2.2 1996/05/09 02:33:02 wessels Exp $ */ + + #include "config.h" + #include "autoconf.h" + #include "version.h" + #include #include #include *************** *** 16,21 **** --- 21,27 ---- #define HASHTABLE_M 9 static Host HostTable[HASHTABLE_N]; + static int hash_index _PARAMS((char *buf)); static int hash_index(buf) char *buf; *************** *** 22,29 **** { static int n = HASHTABLE_N; static int m = HASHTABLE_M; ! register int val = 0; ! register char *s; for (s = buf; *s; s++) val += (int) (*s * m); --- 28,35 ---- { static int n = HASHTABLE_N; static int m = HASHTABLE_M; ! int val = 0; ! char *s = NULL; for (s = buf; *s; s++) val += (int) (*s * m); *************** *** 127,137 **** } } else { H = gethostbyname(hn); ! if (H == (struct hostent *) NULL) Debug(86, 1, ("new_host: gethostbyname(%s) failed.\n", hn)); } ! if (H == (struct hostent *) NULL) { Debug(86, 1, ("new_host: %s: unknown host\n", hn)); xfree(hn); return 0; --- 133,143 ---- } } else { H = gethostbyname(hn); ! if (H == NULL) Debug(86, 1, ("new_host: gethostbyname(%s) failed.\n", hn)); } ! if (H == NULL) { Debug(86, 1, ("new_host: %s: unknown host\n", hn)); xfree(hn); return 0; *************** *** 152,157 **** --- 158,164 ---- return h; } + #ifdef UNUSED_CODE void dump_host_cache(d_sec, d_lvl) int d_sec; int d_lvl; *************** *** 168,173 **** --- 175,181 ---- } } } + #endif /* UNUSED_CODE */ /* ========== MISC UTIL FUNCS ============================================== */ diff -cr squid-1.0.beta6/lib/log.c squid-1.0.beta7/lib/log.c *** squid-1.0.beta6/lib/log.c Sat Apr 13 20:25:16 1996 --- squid-1.0.beta7/lib/log.c Wed May 08 19:33:02 1996 *************** *** 1,6 **** ! /* $Id: log.c,v 1.3 1996/04/14 03:25:16 wessels Exp $ */ #include #include #include --- 1,10 ---- ! /* $Id: log.c,v 1.3.2.2 1996/05/09 02:33:02 wessels Exp $ */ + #include "config.h" + #include "autoconf.h" + #include "version.h" + #include #include #include *************** *** 17,23 **** #include "util.h" /* Local functions */ ! static char *standard_msg(); /* Local variables */ static FILE *fp_log = NULL; --- 21,27 ---- #include "util.h" /* Local functions */ ! static char *standard_msg _PARAMS((void)); /* Local variables */ static FILE *fp_log = NULL; *************** *** 26,31 **** --- 30,36 ---- static char *pname = NULL; static char lbuf[2048]; + #ifdef UNUSED_CODE /* * init_log() - Initializes the logging routines. Log() prints to * FILE *a, and errorlog() prints to FILE *b; *************** *** 42,47 **** --- 47,53 ---- if (fp_errs) setbuf(fp_errs, NULL); } + #endif void init_log3(pn, a, b) char *pn; *************** *** 164,169 **** --- 170,176 ---- exit(1); } + #ifdef UNUSED_CODE /* * log_errno() - Same as perror(); doesn't print when errno == 0 */ *************** *** 173,178 **** --- 180,186 ---- if (errno != 0) errorlog("%s: %s\n", s, strerror(errno)); } + #endif /* * log_errno2() - Same as perror(); doesn't print when errno == 0 *************** *** 187,192 **** --- 195,201 ---- } + #ifdef UNUSED_CODE /* * fatal_errno() - Same as perror() */ *************** *** 195,200 **** --- 204,211 ---- { fatal("%s: %s\n", s, strerror(errno)); } + + #endif /* * standard_msg() - Prints the standard pid and timestamp diff -cr squid-1.0.beta6/lib/rfc1738.c squid-1.0.beta7/lib/rfc1738.c *** squid-1.0.beta6/lib/rfc1738.c Thu Feb 29 00:15:23 1996 --- squid-1.0.beta7/lib/rfc1738.c Wed May 08 19:33:03 1996 *************** *** 1,5 **** ! /* $Id: rfc1738.c,v 1.2 1996/02/29 08:15:23 wessels Exp $ */ #include #include #include "util.h" --- 1,9 ---- ! /* $Id: rfc1738.c,v 1.2.2.2 1996/05/09 02:33:03 wessels Exp $ */ + #include "config.h" + #include "autoconf.h" + #include "version.h" + #include #include #include "util.h" *************** *** 51,57 **** } } /* RFC 1738 says any control chars (0x00-0x1F) are encoded */ ! if ((*p >= (char) 0x00) && (*p <= (char) 0x1F)) { do_escape = 1; } /* RFC 1738 says 0x7f is encoded */ --- 55,61 ---- } } /* RFC 1738 says any control chars (0x00-0x1F) are encoded */ ! if (*p <= (char) 0x1F) { do_escape = 1; } /* RFC 1738 says 0x7f is encoded */ diff -cr squid-1.0.beta6/lib/rfc850.c squid-1.0.beta7/lib/rfc850.c *** squid-1.0.beta6/lib/rfc850.c Sun Apr 14 20:50:49 1996 --- squid-1.0.beta7/lib/rfc850.c Wed May 08 19:33:03 1996 *************** *** 1,5 **** ! /* $Id: rfc850.c,v 1.4 1996/04/15 03:50:49 wessels Exp $ */ /* * Adapted from HTSUtils.c in CERN httpd 3.0 (http://info.cern.ch/httpd/) * by Darren Hardy , November 1994. --- 1,10 ---- ! /* $Id: rfc850.c,v 1.4.2.2 1996/05/09 02:33:03 wessels Exp $ */ + #include "config.h" + #include "autoconf.h" + #include "version.h" + + /* * Adapted from HTSUtils.c in CERN httpd 3.0 (http://info.cern.ch/httpd/) * by Darren Hardy , November 1994. *************** *** 11,16 **** --- 16,25 ---- #include #include #include "config.h" + #include "util.h" + + static int make_month _PARAMS((char *s)); + static int make_num _PARAMS((char *s)); static char *month_names[12] = { diff -cr squid-1.0.beta6/lib/util.c squid-1.0.beta7/lib/util.c *** squid-1.0.beta6/lib/util.c Wed May 01 16:46:42 1996 --- squid-1.0.beta7/lib/util.c Wed May 08 19:33:04 1996 *************** *** 1,5 **** ! /* $Id: util.c,v 1.6.2.1 1996/05/01 23:46:42 wessels Exp $ */ #include #include #include --- 1,9 ---- ! /* $Id: util.c,v 1.6.2.3 1996/05/09 02:33:04 wessels Exp $ */ + #include "config.h" + #include "autoconf.h" + #include "version.h" + #include #include #include *************** *** 9,15 **** #endif #include ! void (*failure_notify) () = NULL; static char msg[128]; extern int sys_nerr; --- 13,21 ---- #endif #include ! #include "util.h" ! ! void (*failure_notify) _PARAMS((char *)) = NULL; static char msg[128]; extern int sys_nerr; *************** *** 17,25 **** extern char *sys_errlist[]; #endif - #include "autoconf.h" - #if XMALLOC_DEBUG #define DBG_ARRY_SZ (2<<8) #define DBG_ARRY_BKTS (2<<8) --- 23,29 ---- *************** *** 34,43 **** static void check_init() { for (B = 0; B < DBG_ARRY_SZ; B++) { ! for (I = 0; I < DBG_ARRY_SZ; I++) { ! malloc_ptrs[B][I] = NULL; ! malloc_size[B][I] = 0; ! } } dbg_initd = 1; } --- 38,47 ---- static void check_init() { for (B = 0; B < DBG_ARRY_SZ; B++) { ! for (I = 0; I < DBG_ARRY_SZ; I++) { ! malloc_ptrs[B][I] = NULL; ! malloc_size[B][I] = 0; ! } } dbg_initd = 1; } *************** *** 204,210 **** char *s; { static char *p = NULL; ! int sz; if (s == NULL) { if (failure_notify) { --- 208,214 ---- char *s; { static char *p = NULL; ! size_t sz; if (s == NULL) { if (failure_notify) { *************** *** 215,221 **** exit(1); } sz = strlen(s); ! p = (char *) xmalloc((size_t) sz + 1); memcpy(p, s, sz); /* copy string */ p[sz] = '\0'; /* terminate string */ return (p); --- 219,225 ---- exit(1); } sz = strlen(s); ! p = xmalloc((size_t) sz + 1); memcpy(p, s, sz); /* copy string */ p[sz] = '\0'; /* terminate string */ return (p); *************** *** 246,252 **** #if !HAVE_STRERROR char *strerror(n) ! int n; { return (xstrerror(n)); } --- 250,256 ---- #if !HAVE_STRERROR char *strerror(n) ! int n; { return (xstrerror(n)); } diff -cr squid-1.0.beta6/scripts/RunCache.in squid-1.0.beta7/scripts/RunCache.in *** squid-1.0.beta6/scripts/RunCache.in Wed May 01 16:46:45 1996 --- squid-1.0.beta7/scripts/RunCache.in Mon May 06 07:57:20 1996 *************** *** 1,10 **** #!/bin/sh # ! # $Id: RunCache.in,v 1.3.2.2 1996/05/01 23:46:45 wessels Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ ! PATH=@bindir@:/bin export PATH conf="" --- 1,10 ---- #!/bin/sh # ! # $Id: RunCache.in,v 1.3.2.3 1996/05/06 14:57:20 wessels Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ ! PATH=@bindir@:/bin:/usr/bin export PATH conf="" diff -cr squid-1.0.beta6/src/acl.c squid-1.0.beta7/src/acl.c *** squid-1.0.beta6/src/acl.c Wed May 01 16:46:48 1996 --- squid-1.0.beta7/src/acl.c Wed May 08 19:31:50 1996 *************** *** 1,4 **** ! /* "$Id: acl.c,v 1.12.2.4 1996/05/01 23:46:48 wessels Exp $" */ /* * DEBUG: Section 28 acl --- 1,4 ---- ! /* "$Id: acl.c,v 1.12.2.5 1996/05/09 02:31:50 wessels Exp $" */ /* * DEBUG: Section 28 acl *************** *** 13,20 **** --- 13,38 ---- static struct _acl *AclList = NULL; static struct _acl **AclListTail = &AclList; + static void aclDestroyAclList _PARAMS((struct _acl_list * list)); + static void aclDestroyIpList _PARAMS((struct _acl_ip_data * data)); + static void aclDestroyRegexList _PARAMS((struct _relist * data)); + static void aclDestroyTimeList _PARAMS((struct _acl_time_data * data)); + static struct _acl *aclFindByName _PARAMS((char *name)); static int aclMatchAcl _PARAMS((struct _acl *, struct in_addr, method_t, protocol_t, char *host, int port, char *request)); static int aclMatchAclList _PARAMS((struct _acl_list *, struct in_addr, method_t, protocol_t, char *host, int port, char *request)); + static int aclMatchInteger _PARAMS((intlist * data, int i)); + static int aclMatchIp _PARAMS((struct _acl_ip_data * data, struct in_addr c)); + static int aclMatchRegex _PARAMS((relist * data, char *word)); + static int aclMatchTime _PARAMS((struct _acl_time_data * data, time_t when)); + static int aclMatchWord _PARAMS((wordlist * data, char *word)); + static intlist *aclParseIntlist _PARAMS((void)); + static struct _acl_ip_data *aclParseIpList _PARAMS((void)); + static intlist *aclParseMethodList _PARAMS((void)); + static intlist *aclParseProtoList _PARAMS((void)); + static struct _relist *aclParseRegexList _PARAMS((void)); + static struct _acl_time_data *aclParseTimeSpec _PARAMS((void)); + static wordlist *aclParseWordList _PARAMS((void)); + static acl_t aclType _PARAMS((char *s)); static acl_t aclType(s) char *s; *************** *** 38,44 **** return ACL_NONE; } ! struct _acl *aclFindByName(name) char *name; { struct _acl *a; --- 56,62 ---- return ACL_NONE; } ! static struct _acl *aclFindByName(name) char *name; { struct _acl *a; *************** *** 49,55 **** } ! intlist *aclParseIntlist() { intlist *head = NULL; intlist **Tail = &head; --- 67,73 ---- } ! static intlist *aclParseIntlist() { intlist *head = NULL; intlist **Tail = &head; *************** *** 56,62 **** intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = (intlist *) xcalloc(1, sizeof(intlist)); q->i = atoi(t); *(Tail) = q; Tail = &q->next; --- 74,80 ---- intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = xcalloc(1, sizeof(intlist)); q->i = atoi(t); *(Tail) = q; Tail = &q->next; *************** *** 64,70 **** return head; } ! intlist *aclParseProtoList() { intlist *head = NULL; intlist **Tail = &head; --- 82,88 ---- return head; } ! static intlist *aclParseProtoList() { intlist *head = NULL; intlist **Tail = &head; *************** *** 71,77 **** intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = (intlist *) xcalloc(1, sizeof(intlist)); q->i = (int) urlParseProtocol(t); *(Tail) = q; Tail = &q->next; --- 89,95 ---- intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = xcalloc(1, sizeof(intlist)); q->i = (int) urlParseProtocol(t); *(Tail) = q; Tail = &q->next; *************** *** 79,85 **** return head; } ! intlist *aclParseMethodList() { intlist *head = NULL; intlist **Tail = &head; --- 97,103 ---- return head; } ! static intlist *aclParseMethodList() { intlist *head = NULL; intlist **Tail = &head; *************** *** 86,92 **** intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = (intlist *) xcalloc(1, sizeof(intlist)); q->i = (int) urlParseMethod(t); *(Tail) = q; Tail = &q->next; --- 104,110 ---- intlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = xcalloc(1, sizeof(intlist)); q->i = (int) urlParseMethod(t); *(Tail) = q; Tail = &q->next; *************** *** 94,100 **** return head; } ! struct _acl_ip_data *aclParseIpList() { char *t = NULL; struct _acl_ip_data *head = NULL; --- 112,118 ---- return head; } ! static struct _acl_ip_data *aclParseIpList() { char *t = NULL; struct _acl_ip_data *head = NULL; *************** *** 106,112 **** int c; while ((t = strtok(NULL, w_space))) { ! q = (struct _acl_ip_data *) xcalloc(1, sizeof(struct _acl_ip_data)); a1 = a2 = a3 = a4 = 0; if (!strcasecmp(t, "all")) { lmask.s_addr = 0; --- 124,130 ---- int c; while ((t = strtok(NULL, w_space))) { ! q = xcalloc(1, sizeof(struct _acl_ip_data)); a1 = a2 = a3 = a4 = 0; if (!strcasecmp(t, "all")) { lmask.s_addr = 0; *************** *** 156,168 **** return head; } ! struct _acl_time_data *aclParseTimeSpec() { struct _acl_time_data *data = NULL; int h1, m1, h2, m2; char *t = NULL; ! data = (struct _acl_time_data *) xcalloc(1, sizeof(struct _acl_time_data)); while ((t = strtok(NULL, w_space))) { if (*t < '0' || *t > '9') { /* assume its day-of-week spec */ --- 174,186 ---- return head; } ! static struct _acl_time_data *aclParseTimeSpec() { struct _acl_time_data *data = NULL; int h1, m1, h2, m2; char *t = NULL; ! data = xcalloc(1, sizeof(struct _acl_time_data)); while ((t = strtok(NULL, w_space))) { if (*t < '0' || *t > '9') { /* assume its day-of-week spec */ *************** *** 226,232 **** return data; } ! struct _relist *aclParseRegexList() { relist *head = NULL; relist **Tail = &head; --- 244,250 ---- return data; } ! static struct _relist *aclParseRegexList() { relist *head = NULL; relist **Tail = &head; *************** *** 240,246 **** debug(28, 0, "aclParseRegexList: Invalid regular expression: '%s'\n", t); continue; } ! q = (relist *) xcalloc(1, sizeof(relist)); q->pattern = xstrdup(t); q->regex = comp; *(Tail) = q; --- 258,264 ---- debug(28, 0, "aclParseRegexList: Invalid regular expression: '%s'\n", t); continue; } ! q = xcalloc(1, sizeof(relist)); q->pattern = xstrdup(t); q->regex = comp; *(Tail) = q; *************** *** 249,255 **** return head; } ! wordlist *aclParseWordList() { wordlist *head = NULL; wordlist **Tail = &head; --- 267,273 ---- return head; } ! static wordlist *aclParseWordList() { wordlist *head = NULL; wordlist **Tail = &head; *************** *** 256,262 **** wordlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = (wordlist *) xcalloc(1, sizeof(wordlist)); q->key = xstrdup(t); *(Tail) = q; Tail = &q->next; --- 274,280 ---- wordlist *q = NULL; char *t = NULL; while ((t = strtok(NULL, w_space))) { ! q = xcalloc(1, sizeof(wordlist)); q->key = xstrdup(t); *(Tail) = q; Tail = &q->next; *************** *** 272,278 **** char *t = NULL; struct _acl *A = NULL; ! A = (struct _acl *) xcalloc(1, sizeof(struct _acl)); /* snarf the ACL name */ if ((t = strtok(NULL, w_space)) == NULL) { debug(28, 0, "%s line %d: %s\n", --- 290,296 ---- char *t = NULL; struct _acl *A = NULL; ! A = xcalloc(1, sizeof(struct _acl)); /* snarf the ACL name */ if ((t = strtok(NULL, w_space)) == NULL) { debug(28, 0, "%s line %d: %s\n", *************** *** 330,336 **** xfree(A); return; /* NOTREACHED */ - break; } A->cfgline = xstrdup(config_input_line); *AclListTail = A; --- 348,353 ---- *************** *** 355,361 **** debug(28, 0, "aclParseAccessLine: missing 'allow' or 'deny'.\n"); return; } ! A = (struct _acl_access *) xcalloc(1, sizeof(struct _acl_access)); if (!strcmp(t, "allow")) A->allow = 1; else if (!strcmp(t, "deny")) --- 372,378 ---- debug(28, 0, "aclParseAccessLine: missing 'allow' or 'deny'.\n"); return; } ! A = xcalloc(1, sizeof(struct _acl_access)); if (!strcmp(t, "allow")) A->allow = 1; else if (!strcmp(t, "deny")) *************** *** 372,378 **** * by '!' for negation */ Tail = &A->acl_list; while ((t = strtok(NULL, w_space))) { ! L = (struct _acl_list *) xcalloc(1, sizeof(struct _acl_list)); L->op = 1; /* defaults to non-negated */ if (*t == '!') { /* negated ACL */ --- 389,395 ---- * by '!' for negation */ Tail = &A->acl_list; while ((t = strtok(NULL, w_space))) { ! L = xcalloc(1, sizeof(struct _acl_list)); L->op = 1; /* defaults to non-negated */ if (*t == '!') { /* negated ACL */ *************** *** 404,410 **** *T = A; } ! int aclMatchIp(data, c) struct _acl_ip_data *data; struct in_addr c; { --- 421,427 ---- *T = A; } ! static int aclMatchIp(data, c) struct _acl_ip_data *data; struct in_addr c; { *************** *** 423,429 **** return 0; } ! int aclMatchWord(data, word) wordlist *data; char *word; { --- 440,446 ---- return 0; } ! static int aclMatchWord(data, word) wordlist *data; char *word; { *************** *** 438,444 **** } return 0; } ! int aclMatchRegex(data, word) relist *data; char *word; { --- 455,462 ---- } return 0; } ! ! static int aclMatchRegex(data, word) relist *data; char *word; { *************** *** 453,459 **** } return 0; } ! int aclMatchInteger(data, i) intlist *data; int i; { --- 471,478 ---- } return 0; } ! ! static int aclMatchInteger(data, i) intlist *data; int i; { *************** *** 465,471 **** return 0; } ! int aclMatchTime(data, when) struct _acl_time_data *data; time_t when; { --- 484,490 ---- return 0; } ! static int aclMatchTime(data, when) struct _acl_time_data *data; time_t when; { *************** *** 502,537 **** case ACL_SRC_IP: return aclMatchIp(acl->data, c); /* NOTREACHED */ - break; case ACL_DST_DOMAIN: return aclMatchWord(acl->data, h); /* NOTREACHED */ - break; case ACL_TIME: return aclMatchTime(acl->data, squid_curtime); /* NOTREACHED */ - break; case ACL_URL_REGEX: return aclMatchRegex(acl->data, r); /* NOTREACHED */ - break; case ACL_URL_PORT: return aclMatchInteger(acl->data, po); /* NOTREACHED */ - break; case ACL_USER: debug(28, 0, "aclMatchAcl: ACL_USER unimplemented\n"); return 0; /* NOTREACHED */ - break; case ACL_PROTO: return aclMatchInteger(acl->data, pr); /* NOTREACHED */ - break; case ACL_METHOD: return aclMatchInteger(acl->data, m); /* NOTREACHED */ - break; case ACL_NONE: default: debug(28, 0, "aclMatchAcl: '%s' has bad type %d\n", --- 521,548 ---- *************** *** 538,545 **** acl->name, acl->type); return 0; } ! fatal_dump("aclMatchAcl: This should never happen."); ! return 0; } static int aclMatchAclList(list, c, m, pr, h, po, r) --- 549,555 ---- acl->name, acl->type); return 0; } ! /* NOTREACHED */ } static int aclMatchAclList(list, c, m, pr, h, po, r) diff -cr squid-1.0.beta6/src/acl.h squid-1.0.beta7/src/acl.h *** squid-1.0.beta6/src/acl.h Mon Apr 15 18:51:16 1996 --- squid-1.0.beta7/src/acl.h Wed May 08 19:31:51 1996 *************** *** 70,77 **** extern void aclDestroyAcls _PARAMS((void)); extern void aclParseAccessLine _PARAMS((struct _acl_access **)); extern void aclParseAclLine _PARAMS((void)); - extern int aclMatchInteger _PARAMS((intlist *, int)); - extern struct _acl_access *HTTPAccessList; extern struct _acl_access *ICPAccessList; --- 70,75 ---- diff -cr squid-1.0.beta6/src/cache_cf.c squid-1.0.beta7/src/cache_cf.c *** squid-1.0.beta6/src/cache_cf.c Thu May 02 17:11:58 1996 --- squid-1.0.beta7/src/cache_cf.c Wed May 08 20:40:11 1996 *************** *** 1,4 **** ! /* $Id: cache_cf.c,v 1.53.4.11 1996/05/03 00:11:58 wessels Exp $ */ /* DEBUG: Section 3 cache_cf: Configuration file parsing */ --- 1,4 ---- ! /* $Id: cache_cf.c,v 1.53.4.14 1996/05/09 03:40:11 wessels Exp $ */ /* DEBUG: Section 3 cache_cf: Configuration file parsing */ *************** *** 171,176 **** --- 171,177 ---- static void configSetFactoryDefaults _PARAMS((void)); static void configFreeMemory _PARAMS((void)); static void configDoConfigure _PARAMS((void)); + static char *safe_xstrdup _PARAMS((char *p)); static char fatal_str[BUFSIZ]; void self_destruct() *************** *** 364,370 **** #define GetInteger(var) \ token = strtok(NULL, w_space); \ ! if( token == (char *) NULL) \ self_destruct(); \ if (sscanf(token, "%d", &var) != 1) \ self_destruct(); --- 365,371 ---- #define GetInteger(var) \ token = strtok(NULL, w_space); \ ! if( token == NULL) \ self_destruct(); \ if (sscanf(token, "%d", &var) != 1) \ self_destruct(); *************** *** 410,419 **** if (!(host = strtok(NULL, w_space))) self_destruct(); ! while ((domain = strtok(NULL, ", \t\n"))) { ! if (neighbors_cf_domain(host, domain) == 0) ! self_destruct(); ! } } --- 411,418 ---- if (!(host = strtok(NULL, w_space))) self_destruct(); ! while ((domain = strtok(NULL, ", \t\n"))) ! neighbors_cf_domain(host, domain); } *************** *** 422,428 **** char *srcping; srcping = strtok(NULL, w_space); ! if (srcping == (char *) NULL) self_destruct(); /* set source_ping, default is off. */ --- 421,427 ---- char *srcping; srcping = strtok(NULL, w_space); ! if (srcping == NULL) self_destruct(); /* set source_ping, default is off. */ *************** *** 440,446 **** char *abort; abort = strtok(NULL, w_space); ! if (abort == (char *) NULL) self_destruct(); if (!strcasecmp(abort, "on") || !strcasecmp(abort, "quick")) --- 439,445 ---- char *abort; abort = strtok(NULL, w_space); ! if (abort == NULL) self_destruct(); if (!strcasecmp(abort, "on") || !strcasecmp(abort, "quick")) *************** *** 482,488 **** double d; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); if (sscanf(token, "%lf", &d) != 1) self_destruct(); --- 481,487 ---- double d; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); if (sscanf(token, "%lf", &d) != 1) self_destruct(); *************** *** 555,561 **** int i; token = strtok(NULL, w_space); /* token: regex pattern */ ! if (token == (char *) NULL) self_destruct(); pattern = xstrdup(token); --- 554,560 ---- int i; token = strtok(NULL, w_space); /* token: regex pattern */ ! if (token == NULL) self_destruct(); pattern = xstrdup(token); *************** *** 662,668 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.adminEmail); Config.adminEmail = xstrdup(token); --- 661,667 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.adminEmail); Config.adminEmail = xstrdup(token); *************** *** 673,679 **** char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); wordlistAdd(&Config.cache_dirs, token); } --- 672,678 ---- char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); wordlistAdd(&Config.cache_dirs, token); } *************** *** 685,691 **** int i; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Accel.host); Config.Accel.host = xstrdup(token); --- 684,690 ---- int i; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Accel.host); Config.Accel.host = xstrdup(token); *************** *** 702,708 **** char *proxy; proxy = strtok(NULL, w_space); ! if (proxy == (char *) NULL) self_destruct(); /* set httpd_accel_with_proxy, default is off. */ --- 701,707 ---- char *proxy; proxy = strtok(NULL, w_space); ! if (proxy == NULL) self_destruct(); /* set httpd_accel_with_proxy, default is off. */ *************** *** 719,725 **** char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.effectiveUser); safe_free(Config.effectiveGroup); --- 718,724 ---- char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.effectiveUser); safe_free(Config.effectiveGroup); *************** *** 726,732 **** Config.effectiveUser = xstrdup(token); token = strtok(NULL, w_space); ! if (token == (char *) NULL) return; /* group is optional */ Config.effectiveGroup = xstrdup(token); } --- 725,731 ---- Config.effectiveUser = xstrdup(token); token = strtok(NULL, w_space); ! if (token == NULL) return; /* group is optional */ Config.effectiveGroup = xstrdup(token); } *************** *** 735,741 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Log.log); Config.Log.log = xstrdup(token); --- 734,740 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Log.log); Config.Log.log = xstrdup(token); *************** *** 745,751 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Log.access); Config.Log.access = xstrdup(token); --- 744,750 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Log.access); Config.Log.access = xstrdup(token); *************** *** 755,761 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Log.hierarchy); Config.Log.hierarchy = xstrdup(token); --- 754,760 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Log.hierarchy); Config.Log.hierarchy = xstrdup(token); *************** *** 765,771 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Log.store); Config.Log.store = xstrdup(token); --- 764,770 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Log.store); Config.Log.store = xstrdup(token); *************** *** 783,789 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Program.ftpget); Config.Program.ftpget = xstrdup(token); --- 782,788 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Program.ftpget); Config.Program.ftpget = xstrdup(token); *************** *** 793,799 **** { char *token; token = strtok(NULL, ""); /* Note "", don't separate these */ ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Program.ftpget_opts); Config.Program.ftpget_opts = xstrdup(token); --- 792,798 ---- { char *token; token = strtok(NULL, ""); /* Note "", don't separate these */ ! if (token == NULL) self_destruct(); safe_free(Config.Program.ftpget_opts); Config.Program.ftpget_opts = xstrdup(token); *************** *** 803,809 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Program.dnsserver); Config.Program.dnsserver = xstrdup(token); --- 802,808 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Program.dnsserver); Config.Program.dnsserver = xstrdup(token); *************** *** 813,819 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); if (!strcasecmp(token, "on") || !strcasecmp(token, "enable")) Config.commonLogFormat = 1; --- 812,818 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); if (!strcasecmp(token, "on") || !strcasecmp(token, "enable")) Config.commonLogFormat = 1; *************** *** 826,832 **** char *token; int i; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Wais.relayHost); Config.Wais.relayHost = xstrdup(token); --- 825,831 ---- char *token; int i; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Wais.relayHost); Config.Wais.relayHost = xstrdup(token); *************** *** 848,854 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) return; wordlistAdd(&Config.http_stoplist, token); } --- 847,853 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) return; wordlistAdd(&Config.http_stoplist, token); } *************** *** 857,863 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) return; wordlistAdd(&Config.gopher_stoplist, token); } --- 856,862 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) return; wordlistAdd(&Config.gopher_stoplist, token); } *************** *** 865,871 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) return; wordlistAdd(&Config.ftp_stoplist, token); } --- 864,870 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) return; wordlistAdd(&Config.ftp_stoplist, token); } *************** *** 874,880 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); if (*token != '.') self_destruct(); --- 873,879 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); if (*token != '.') self_destruct(); *************** *** 886,892 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); debug(3, 1, "parseBindAddressLine: adding %s\n", token); wordlistAdd(&Config.bind_addr_list, token); --- 885,891 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); debug(3, 1, "parseBindAddressLine: adding %s\n", token); wordlistAdd(&Config.bind_addr_list, token); *************** *** 977,983 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); if (!strcasecmp(token, "on")) Config.singleParentBypass = 1; --- 976,982 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); if (!strcasecmp(token, "on")) Config.singleParentBypass = 1; *************** *** 988,994 **** char *token; token = strtok(NULL, ""); /* Note "", don't separate these */ safe_free(Config.debugOptions); ! if (token == (char *) NULL) { Config.debugOptions = NULL; return; } --- 987,993 ---- char *token; token = strtok(NULL, ""); /* Note "", don't separate these */ safe_free(Config.debugOptions); ! if (token == NULL) { Config.debugOptions = NULL; return; } *************** *** 1000,1006 **** char *token; token = strtok(NULL, w_space); safe_free(Config.pidFilename); ! if (token == (char *) NULL) self_destruct(); Config.pidFilename = xstrdup(token); } --- 999,1005 ---- char *token; token = strtok(NULL, w_space); safe_free(Config.pidFilename); ! if (token == NULL) self_destruct(); Config.pidFilename = xstrdup(token); } *************** *** 1010,1016 **** char *token; token = strtok(NULL, w_space); safe_free(Config.visibleHostname); ! if (token == (char *) NULL) self_destruct(); Config.visibleHostname = xstrdup(token); } --- 1009,1015 ---- char *token; token = strtok(NULL, w_space); safe_free(Config.visibleHostname); ! if (token == NULL) self_destruct(); Config.visibleHostname = xstrdup(token); } *************** *** 1019,1025 **** { char *token; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.ftpUser); Config.ftpUser = xstrdup(token); --- 1018,1024 ---- { char *token; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.ftpUser); Config.ftpUser = xstrdup(token); *************** *** 1038,1044 **** char *token; int i; token = strtok(NULL, w_space); ! if (token == (char *) NULL) self_destruct(); safe_free(Config.Announce.host); Config.Announce.host = xstrdup(token); --- 1037,1043 ---- char *token; int i; token = strtok(NULL, w_space); ! if (token == NULL) self_destruct(); safe_free(Config.Announce.host); Config.Announce.host = xstrdup(token); *************** *** 1048,1054 **** Config.Announce.port = i; } token = strtok(NULL, w_space); ! if (token == (char *) NULL) return; safe_free(Config.Announce.file); Config.Announce.file = xstrdup(token); --- 1047,1053 ---- Config.Announce.port = i; } token = strtok(NULL, w_space); ! if (token == NULL) return; safe_free(Config.Announce.file); Config.Announce.file = xstrdup(token); *************** *** 1502,1507 **** --- 1501,1510 ---- { return Config.Accel.prefix; } + int getAccelPort() + { + return Config.Accel.port; + } int getAccelWithProxy() { return Config.Accel.withProxy; *************** *** 1643,1658 **** } ! char *safe_xstrdup(p) char *p; { return p ? xstrdup(p) : p; - } - - int safe_strlen(p) - char *p; - { - return p ? strlen(p) : -1; } static void configFreeMemory() --- 1646,1655 ---- } ! static char *safe_xstrdup(p) char *p; { return p ? xstrdup(p) : p; } static void configFreeMemory() diff -cr squid-1.0.beta6/src/cache_cf.h squid-1.0.beta7/src/cache_cf.h *** squid-1.0.beta6/src/cache_cf.h Wed May 01 12:43:49 1996 --- squid-1.0.beta7/src/cache_cf.h Wed May 08 16:21:54 1996 *************** *** 1,5 **** ! /* $Id: cache_cf.h,v 1.31.4.1 1996/05/01 19:43:49 wessels Exp $ */ #ifndef _CACHE_CONFIG_H_ #define _CACHE_CONFIG_H_ --- 1,5 ---- ! /* $Id: cache_cf.h,v 1.31.4.2 1996/05/08 23:21:54 wessels Exp $ */ #ifndef _CACHE_CONFIG_H_ #define _CACHE_CONFIG_H_ *************** *** 54,59 **** --- 54,60 ---- /* Global Functions */ extern char *getAccelPrefix _PARAMS((void)); + extern int getAccelPort _PARAMS((void)); extern char *getAccessLogFile _PARAMS((void)); extern char *getAdminEmail _PARAMS((void)); extern char *getAnnounceFile _PARAMS((void)); diff -cr squid-1.0.beta6/src/cachemgr.c squid-1.0.beta7/src/cachemgr.c *** squid-1.0.beta6/src/cachemgr.c Thu May 02 18:12:50 1996 --- squid-1.0.beta7/src/cachemgr.c Wed May 08 19:31:52 1996 *************** *** 1,4 **** ! /* $Id: cachemgr.c,v 1.7.2.6 1996/05/03 01:12:50 wessels Exp $ */ #include "config.h" #include "autoconf.h" --- 1,4 ---- ! /* $Id: cachemgr.c,v 1.7.2.8 1996/05/09 02:31:52 wessels Exp $ */ #include "config.h" #include "autoconf.h" *************** *** 74,79 **** --- 74,80 ---- STATS_O, STATS_VM, STATS_U, + STATS_IO, SHUTDOWN, REFRESH, #ifdef REMOVE_OBJECT *************** *** 93,98 **** --- 94,100 ---- "stats/objects", "stats/vm_objects", "stats/utilization", + "stats/io", "shutdown", "", #ifdef REMOVE_OBJECT *************** *** 158,163 **** --- 160,166 ---- printf("