Index: src/cf.data.pre =================================================================== RCS file: /cvsroot/squid/squid/src/cf.data.pre,v retrieving revision 1.49.2.16 diff -u -p -r1.49.2.16 cf.data.pre --- src/cf.data.pre 4 Jul 2002 09:46:25 -0000 1.49.2.16 +++ src/cf.data.pre 14 Jul 2002 07:55:33 -0000 @@ -1170,6 +1170,7 @@ LOC: Config.Program.pinger IFDEF: USE_ICMP DOC_START Specify the location of the executable for the pinger process. + To disable, enter "none". DOC_END Index: src/icmp.c =================================================================== RCS file: /cvsroot/squid/squid/src/icmp.c,v retrieving revision 1.4.66.1 diff -u -p -r1.4.66.1 icmp.c --- src/icmp.c 31 Mar 2002 15:14:44 -0000 1.4.66.1 +++ src/icmp.c 14 Jul 2002 07:55:33 -0000 @@ -71,6 +71,8 @@ icmpRecv(int unused1, void *unused2) static int fail_count = 0; pingerReplyData preply; static struct sockaddr_in F; + if (icmp_sock < 0) + return; commSetSelect(icmp_sock, COMM_SELECT_READ, icmpRecv, NULL, 0); memset(&preply, '\0', sizeof(pingerReplyData)); statCounter.syscalls.sock.recvfroms++; @@ -194,6 +196,10 @@ icmpOpen(void) int x; int rfd; int wfd; + if (strcmp(Config.Program.pinger, "none") == 0) { + debug(29, 1) ("Pinger disabled\n"); + return; + } args[0] = "(pinger)"; args[1] = NULL; x = ipcCreate(IPC_UDP_SOCKET, Index: src/net_db.c =================================================================== RCS file: /cvsroot/squid/squid/src/net_db.c,v retrieving revision 1.11.22.1 diff -u -p -r1.11.22.1 net_db.c --- src/net_db.c 26 Jun 2002 20:45:14 -0000 1.11.22.1 +++ src/net_db.c 14 Jul 2002 07:55:34 -0000 @@ -442,8 +442,8 @@ netdbReloadState(void) file_close(fd); return; } - t = buf = xcalloc(1, sb.st_size + 1); - l = FD_READ_METHOD(fd, buf, sb.st_size); + t = buf = xcalloc(1, (size_t) sb.st_size + 1); + l = FD_READ_METHOD(fd, buf, (size_t) sb.st_size); file_close(fd); if (l <= 0) return; @@ -661,6 +661,8 @@ netdbInit(void) { #if USE_ICMP int n; + if (icmp_sock < 0) + return; if (addr_table) return; n = hashPrime(Config.Netdb.high / 4);