Ed Ravin wrote:
>
> The fping.monitor in mon-0.99.2 doesn't know how to parse fping's
> output when it gets an ICMP destination unreachable message.  A
> simple patch for the problem is below.  My fping version is 2.2b1.

I also found this to be a problem, but I patched fping.c, since it's
not necessary for it to be generating special error messages in these
cases:


*** fping.c     Wed Jan  8 15:29:43 1997
--- fping.c.new Thu Oct  4 15:30:45 2001
***************
*** 1052,1057 ****
--- 1052,1058 ----
  #endif
    n = sendto( s, buffer, ping_pkt_size, 0, (struct sockaddr *)&h->saddr, 
                                                 sizeof(struct sockaddr_in) );
+ #ifdef CHECK_ERRORS
    if( n < 0 || n != ping_pkt_size ) {
        if (verbose_flag || unreachable_flag) {
        printf("%s", h->host);
***************
*** 1062,1067 ****
--- 1063,1069 ----
        num_unreachable++;
        remove_job(h); 
    } else {
+ #endif
         /* mark this trial as outstanding */
      if (!loop_flag)
        h->resp_times[h->num_sent] = RESP_WAITING;
***************
*** 1074,1080 ****
--- 1076,1084 ----
      h->waiting++;
      num_pingsent++;
      last_send_time = h->last_send_time;
+ #ifdef CHECK_ERRORS
    }
+ #endif
    free(buffer);
  }
  

--
Andrew Siegel
Head of Systems
Blue Sky Studios, Inc.
44 South Broadway, 17th floor
White Plains, NY 10601
914-259-6336 direct
914-259-6500 main
914-259-6499 fax
[EMAIL PROTECTED]

Reply via email to