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 20 Jul 2002 14:46:57 -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 20 Jul 2002 14:46:57 -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++; @@ -151,6 +153,8 @@ void icmpPing(struct in_addr to) { #if USE_ICMP + if (icmp_sock < 0) + return; icmpSendEcho(to, S_ICMP_ECHO, NULL, 0); #endif } @@ -163,6 +167,8 @@ icmpSourcePing(struct in_addr to, const char *payload; int len; int ulen; + if (icmp_sock < 0) + return; debug(37, 3) ("icmpSourcePing: '%s'\n", url); if ((ulen = strlen(url)) > MAX_URL) return; @@ -181,6 +187,8 @@ void icmpDomainPing(struct in_addr to, const char *domain) { #if USE_ICMP + if (icmp_sock < 0) + return; debug(37, 3) ("icmpDomainPing: '%s'\n", domain); icmpSendEcho(to, S_ICMP_DOM, domain, 0); #endif @@ -194,6 +202,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,