diff options
author | Rob Landley <rob@landley.net> | 2005-12-15 08:04:17 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-15 08:04:17 +0000 |
commit | 42eddbafe72143b2f689fcedd387de80eaf8926f (patch) | |
tree | 8c0a094fea3b1b64069763dadca040320f30a5b5 /networking/ping.c | |
parent | ae50c6d8ee755ae2171d0d2514c045a2e8cb3134 (diff) | |
download | busybox-w32-42eddbafe72143b2f689fcedd387de80eaf8926f.tar.gz busybox-w32-42eddbafe72143b2f689fcedd387de80eaf8926f.tar.bz2 busybox-w32-42eddbafe72143b2f689fcedd387de80eaf8926f.zip |
Add a fflush(stdout).
Diffstat (limited to 'networking/ping.c')
-rw-r--r-- | networking/ping.c | 62 |
1 files changed, 4 insertions, 58 deletions
diff --git a/networking/ping.c b/networking/ping.c index b36ab1881..646f4ac37 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -5,30 +5,11 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Adapted from the ping in netkit-base 0.10: |
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | * This version of ping is adapted from the ping in netkit-base 0.10, | ||
23 | * which is: | ||
24 | * | ||
25 | * Copyright (c) 1989 The Regents of the University of California. | 9 | * Copyright (c) 1989 The Regents of the University of California. |
26 | * All rights reserved. | 10 | * Derived from software contributed to Berkeley by Mike Muuss. |
27 | * | 11 | * |
28 | * This code is derived from software contributed to Berkeley by | 12 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
29 | * Mike Muuss. | ||
30 | * | ||
31 | * Original copyright notice is retained at the end of this file. | ||
32 | */ | 13 | */ |
33 | 14 | ||
34 | #include <sys/param.h> | 15 | #include <sys/param.h> |
@@ -337,6 +318,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from) | |||
337 | if (icmppkt->icmp_type != ICMP_ECHO) | 318 | if (icmppkt->icmp_type != ICMP_ECHO) |
338 | bb_error_msg("Warning: Got ICMP %d (%s)", | 319 | bb_error_msg("Warning: Got ICMP %d (%s)", |
339 | icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type)); | 320 | icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type)); |
321 | fflush(stdout); | ||
340 | } | 322 | } |
341 | 323 | ||
342 | static void ping(const char *host) | 324 | static void ping(const char *host) |
@@ -438,39 +420,3 @@ extern int ping_main(int argc, char **argv) | |||
438 | return EXIT_SUCCESS; | 420 | return EXIT_SUCCESS; |
439 | } | 421 | } |
440 | #endif /* ! CONFIG_FEATURE_FANCY_PING */ | 422 | #endif /* ! CONFIG_FEATURE_FANCY_PING */ |
441 | |||
442 | /* | ||
443 | * Copyright (c) 1989 The Regents of the University of California. | ||
444 | * All rights reserved. | ||
445 | * | ||
446 | * This code is derived from software contributed to Berkeley by | ||
447 | * Mike Muuss. | ||
448 | * | ||
449 | * Redistribution and use in source and binary forms, with or without | ||
450 | * modification, are permitted provided that the following conditions | ||
451 | * are met: | ||
452 | * 1. Redistributions of source code must retain the above copyright | ||
453 | * notice, this list of conditions and the following disclaimer. | ||
454 | * 2. Redistributions in binary form must reproduce the above copyright | ||
455 | * notice, this list of conditions and the following disclaimer in the | ||
456 | * documentation and/or other materials provided with the distribution. | ||
457 | * | ||
458 | * 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change | ||
459 | * ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change> | ||
460 | * | ||
461 | * 4. Neither the name of the University nor the names of its contributors | ||
462 | * may be used to endorse or promote products derived from this software | ||
463 | * without specific prior written permission. | ||
464 | * | ||
465 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
466 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
467 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
468 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
469 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
470 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
471 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
472 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
473 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
474 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
475 | * SUCH DAMAGE. | ||
476 | */ | ||