1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-21 02:48:46 +00:00

While calling perror() on send() failure was useful for debugging the

if_em "wedging" problem, large numbers of perror() calls impacts send
performance.  As such, just count the error, don't print it.
This commit is contained in:
Robert Watson 2004-09-30 06:17:26 +00:00
parent 35f6d35141
commit fbcd15008a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135954
2 changed files with 2 additions and 3 deletions

View File

@ -2,6 +2,7 @@
# $FreeBSD$
#
CFLAGS+= -Wall
PROG= netsend
NOMAN= yes

View File

@ -170,10 +170,8 @@ timing_loop(int s, struct timespec interval, long duration, u_char *packet,
*((u_int32_t *)packet) = htonl(counter);
counter++;
}
if (send(s, packet, packet_len, 0) < 0) {
perror("send");
if (send(s, packet, packet_len, 0) < 0)
send_errors++;
}
send_calls++;
if (duration != 0 && tmptime.tv_sec >= finishtime)
goto done;