From f4dbd6a0b24057198ff288b3777dc8fab501839e Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 4 May 2002 18:02:32 +0000 Subject: [PATCH] Code cleanup for ping --- mbtask/ping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mbtask/ping.c b/mbtask/ping.c index 3ef8ee22..3dadfc26 100644 --- a/mbtask/ping.c +++ b/mbtask/ping.c @@ -222,7 +222,8 @@ int ping_send(struct in_addr addr) sentlen = sendto(ping_isocket, &icmpd, ICMP4_ECHO_LEN, 0, (struct sockaddr *)&to, sizeof(to)); if (sentlen != ICMP4_ECHO_LEN) { - tasklog('+', "ping: sent %d octets, ret %d", ICMP4_ECHO_LEN, sentlen); + if (icmp_errs < ICMP_MAX_ERRS) + tasklog('+', "ping: sent %d octets, ret %d", ICMP4_ECHO_LEN, sentlen); return -2; } return 0;