Index: configure.in =================================================================== RCS file: /cvsroot/squid/squid/configure.in,v retrieving revision 1.1.1.3.4.7 diff -u -p -r1.1.1.3.4.7 configure.in --- configure.in 2001/08/19 10:28:09 1.1.1.3.4.7 +++ configure.in 2001/08/19 18:30:11 @@ -914,12 +914,12 @@ dnl during compile. ;; esac -# Remove optimization for GCC 2.95.[12] +# Remove optimization for GCC 2.95.[123] # gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL if test "$GCC" = "yes"; then GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'` case "$GCCVER" in - [2.95.[12]]) + [2.95.[123]]) echo "Removing -O for gcc on $host with GCC $GCCVER" CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`" ;; Index: include/snmp-internal.h =================================================================== RCS file: /cvsroot/squid/squid/include/snmp-internal.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 snmp-internal.h --- include/snmp-internal.h 2000/01/26 03:21:47 1.1.1.1 +++ include/snmp-internal.h 2001/08/19 18:30:12 @@ -32,10 +32,4 @@ #define SNMP_TRAP_PORT 162 #define SNMP_MAX_LEN 484 -#ifdef DEBUG -#define ERROR(string) printf("%s(%d): %s\n",__FILE__, __LINE__, string); -#else -#define ERROR(string) -#endif - #endif /* _SNMP_INTERNAL_H_ */ Index: src/asn.c =================================================================== RCS file: /cvsroot/squid/squid/src/asn.c,v retrieving revision 1.1.1.3.4.2 diff -u -p -r1.1.1.3.4.2 asn.c --- src/asn.c 2000/05/22 11:00:39 1.1.1.3.4.2 +++ src/asn.c 2001/08/19 18:30:14 @@ -407,6 +407,8 @@ int mask_len(int mask) { int len = 32; + if (mask == 0) + return 0; while ((mask & 1) == 0) { len--; mask >>= 1; Index: src/cache_cf.c =================================================================== RCS file: /cvsroot/squid/squid/src/cache_cf.c,v retrieving revision 1.1.1.3.4.4 diff -u -p -r1.1.1.3.4.4 cache_cf.c --- src/cache_cf.c 2000/07/01 12:05:14 1.1.1.3.4.4 +++ src/cache_cf.c 2001/08/19 18:30:14 @@ -178,7 +178,7 @@ parseConfigFile(const char *file_name) char *token = NULL; char *tmp_line; int err_count = 0; - free_all(); + configFreeMemory(); default_all(); if ((fp = fopen(file_name, "r")) == NULL) fatalf("Unable to open configuration file: %s: %s", @@ -646,10 +646,12 @@ parse_delay_pool_count(delayConfig * cfg free_delay_pool_count(cfg); } parse_ushort(&cfg->pools); - delayInitDelayData(cfg->pools); - cfg->class = xcalloc(cfg->pools, sizeof(u_char)); - cfg->rates = xcalloc(cfg->pools, sizeof(delaySpecSet *)); - cfg->access = xcalloc(cfg->pools, sizeof(acl_access *)); + if (cfg->pools) { + delayInitDelayData(cfg->pools); + cfg->class = xcalloc(cfg->pools, sizeof(u_char)); + cfg->rates = xcalloc(cfg->pools, sizeof(delaySpecSet *)); + cfg->access = xcalloc(cfg->pools, sizeof(acl_access *)); + } } static void @@ -1735,6 +1737,7 @@ check_null_sockaddr_in_list(const sockad void configFreeMemory(void) { + safe_free(Config2.Accel.prefix); free_all(); } Index: src/http.c =================================================================== RCS file: /cvsroot/squid/squid/src/http.c,v retrieving revision 1.1.1.3.4.3 diff -u -p -r1.1.1.3.4.3 http.c --- src/http.c 2000/07/01 12:05:14 1.1.1.3.4.3 +++ src/http.c 2001/09/09 15:22:31 @@ -512,6 +512,7 @@ httpReadReply(int fd, void *data) ErrorState *err; err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); err->xerrno = errno; + err->request = requestLink((request_t *) request); fwdFail(httpState->fwd, err); comm_close(fd); } else { @@ -521,6 +522,7 @@ httpReadReply(int fd, void *data) ErrorState *err; err = errorCon(ERR_ZERO_SIZE_OBJECT, HTTP_SERVICE_UNAVAILABLE); err->xerrno = errno; + err->request = requestLink((request_t *) request); fwdFail(httpState->fwd, err); httpState->eof = 1; comm_close(fd); Index: src/snmp_agent.c =================================================================== RCS file: /cvsroot/squid/squid/src/snmp_agent.c,v retrieving revision 1.1.1.3.4.1 diff -u -p -r1.1.1.3.4.1 snmp_agent.c --- src/snmp_agent.c 2000/04/17 00:56:53 1.1.1.3.4.1 +++ src/snmp_agent.c 2001/09/09 15:22:34 @@ -299,7 +299,7 @@ snmp_prfSysFn(variable_list * Var, snint break; case PERF_SYS_CURRESERVED_FD: Answer = snmp_var_new_integer(Var->name, Var->name_length, - (snint) Number_FD, + (snint) RESERVED_FD, SMI_GAUGE32); break; case PERF_SYS_NUMOBJCNT: Index: src/snmp_core.c =================================================================== RCS file: /cvsroot/squid/squid/src/snmp_core.c,v retrieving revision 1.1.1.3.4.2 diff -u -p -r1.1.1.3.4.2 snmp_core.c --- src/snmp_core.c 2001/07/27 00:31:58 1.1.1.3.4.2 +++ src/snmp_core.c 2001/08/19 18:30:40 @@ -73,7 +73,6 @@ static oid_ParseFn *snmpTreeNext(oid * C static oid_ParseFn *snmpTreeGet(oid * Current, snint CurrentLen); static mib_tree_entry *snmpTreeEntry(oid entry, snint len, mib_tree_entry * current); static mib_tree_entry *snmpTreeSiblingEntry(oid entry, snint len, mib_tree_entry * current); -static oid *snmpOidDup(oid * A, snint ALen); static void snmpSnmplibDebug(int lvl, char *buf); @@ -949,7 +948,7 @@ snmpAddNode(va_alist) va_start(args, children); entry = xmalloc(sizeof(mib_tree_entry)); - entry->name = snmpOidDup(name, len); + entry->name = name; entry->len = len; entry->parsefunction = parsefunction; entry->instancefunction = instancefunction; @@ -1000,6 +999,7 @@ snmpCreateOid(va_alist) return (new_oid); } +#if UNUSED_CODE /* * Allocate space for, and copy, an OID. Returns new oid. */ @@ -1010,6 +1010,7 @@ snmpOidDup(oid * A, snint ALen) xmemcpy(Ans, A, (sizeof(oid) * ALen)); return Ans; } +#endif /* * Debug calls, prints out the OID for debugging purposes. Index: src/store_dir_ufs.c =================================================================== RCS file: /cvsroot/squid/squid/src/Attic/store_dir_ufs.c,v retrieving revision 1.1.1.1.4.1 diff -u -p -r1.1.1.1.4.1 store_dir_ufs.c --- src/store_dir_ufs.c 2000/04/17 00:56:53 1.1.1.1.4.1 +++ src/store_dir_ufs.c 2001/08/19 18:30:49 @@ -914,9 +915,9 @@ storeUfsDirWriteCleanClose(SwapDir * sd) #ifdef _SQUID_OS2_ file_close(state->fd); state->fd = -1; - if (unlink(cur) < 0) + if (unlink(state->cur) < 0) debug(50, 0) ("storeDirWriteCleanLogs: unlinkd failed: %s, %s\n", - xstrerror(), cur); + xstrerror(), state->cur); #endif xrename(state->new, state->cur); }