mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-23 03:33:34 -04:00
25 lines
657 B
Plaintext
25 lines
657 B
Plaintext
$NetBSD: patch-aj,v 1.2 2009/02/11 08:06:17 obache Exp $
|
|
|
|
--- send.c.orig 2003-08-01 14:53:08.000000000 +0000
|
|
+++ send.c
|
|
@@ -79,9 +79,17 @@ void send_packet (int signal_id)
|
|
else send_tcp();
|
|
|
|
sent_pkt++;
|
|
- Signal(SIGALRM, send_packet);
|
|
|
|
- if (count != -1 && count == sent_pkt) { /* count reached? */
|
|
+ if (opt_flood) {
|
|
+ if (count != -1 && count <= sent_pkt) { /* count reached? */
|
|
+ print_statistics(0);
|
|
+ }
|
|
+ errno = errno_save;
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ Signal(SIGALRM, send_packet);
|
|
+ if (count != -1 && count <= sent_pkt) { /* count reached? */
|
|
Signal(SIGALRM, print_statistics);
|
|
alarm(COUNTREACHED_TIMEOUT);
|
|
} else if (!opt_listenmode) {
|