]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make it compile without USE_ICMP
authorwessels <>
Tue, 24 Sep 1996 04:13:43 +0000 (04:13 +0000)
committerwessels <>
Tue, 24 Sep 1996 04:13:43 +0000 (04:13 +0000)
src/pinger.cc

index 32d32eeceeebb4772d117d081fb2636af62f9b97..2e5b835c5f6ec32750b83963a5a43995ea10baed 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.1 1996/09/20 23:26:58 wessels Exp $
+ * $Id: pinger.cc,v 1.2 1996/09/23 22:13:43 wessels Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
  *  
  */
 
-#if USE_ICMP
-
 #include "squid.h"
 #include "pinger.h"
 
+/* Junk so we can link with debug.o */
+int opt_syslog_enable = 0;
+int unbuffered_logs = 1;
+char w_space[] = " \t\n\r";
+char appname[] = "pinger";
+struct timeval current_time;
+time_t squid_curtime;
+struct SquidConfig Config;
+
+#if USE_ICMP
+
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>
@@ -124,15 +133,6 @@ pingerOpen(void)
     debug(37, 0, "ICMP socket opened on FD %d\n", icmp_sock);
 }
 
-/* Junk so we can link with debug.o */
-int opt_syslog_enable = 0;
-int unbuffered_logs = 1;
-char w_space[] = " \t\n\r";
-char appname[] = "pinger";
-struct timeval current_time;
-time_t squid_curtime;
-struct SquidConfig Config;
-
 void
 pingerClose(void)
 {
@@ -285,6 +285,7 @@ pingerReadRequest(void)
     static pingerEchoData pecho;
     int n;
     int guess_size;
+    memset((char *) &pecho, '\0', sizeof(pecho));
     n = recv(0, (char *) &pecho, sizeof(pecho), 0);
     if (n < 0) {
        perror("recv");
@@ -327,7 +328,7 @@ main(int argc, char *argv[])
     fd_set R;
     int x;
     getCurrentTime();
-    _db_init(NULL, "ALL,9");
+    _db_init(NULL, "ALL,1");
     pingerOpen();
     for (;;) {
        FD_ZERO(&R);