Package: iputils-ping Version: 3:20100418-2 Severity: normal Tags: patch upstream
Previously flood pinging wouldn't beep at all. The upstream source changed in iputils-s20100214 to always beep without any way to disable it. A normal ping uses -a to enable beeping, -A is already used for an unrelated option so that can't be used as a diable beeping, so it makes sense to change the flood behavior to no beeping by default and -a will cause normal and flood pings to beep as the user did request it. That also makes both options be consistent. Patch included. I've already e-mailed the patch to YOSHIFUJI Hideaki, adding a bug report here for tracking. >From ef19fb7a7367748e19fa1634631e6a60620bb3d0 Mon Sep 17 00:00:00 2001 From: David Fries <da...@fries.net> Date: Sat, 23 Oct 2010 13:30:39 -0500 Subject: [PATCH] Only emit an audible ping when requested (including flooding). The changeset 59de58d0f92a2c9b90174e51070aca32e7959e28 "iputils-s20100214" changed flooding to always make an audible ping when flooding, but didn't provide anyway to disable the audible ping when flooding. That's a problem when you want to see the results of the flood ping, but not hear it. This patch changes the behavior to match the normal ping case, no audible ping by default, and -a enables the ping. Signed-off-by: David Fries <da...@fries.net> --- ping.c | 10 +++++----- ping6.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ping.c b/ping.c index 6b9a231..502d1e5 100644 --- a/ping.c +++ b/ping.c @@ -806,16 +806,16 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) return 0; } + if (options & F_AUDIBLE) { + putchar('\a'); + if(options & F_FLOOD) + fflush(stdout); + } if (!(options & F_FLOOD)) { pr_options(buf + sizeof(struct iphdr), hlen); - if (options & F_AUDIBLE) - putchar('\a'); putchar('\n'); fflush(stdout); - } else { - putchar('\a'); - fflush(stdout); } return 0; } diff --git a/ping6.c b/ping6.c index c5ff881..8e6b991 100644 --- a/ping6.c +++ b/ping6.c @@ -1411,14 +1411,14 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) pr_icmph(icmph->icmp6_type, icmph->icmp6_code, ntohl(icmph->icmp6_mtu)); } + if (options & F_AUDIBLE) { + putchar('\a'); + if(options & F_FLOOD) + fflush(stdout); + } if (!(options & F_FLOOD)) { - if (options & F_AUDIBLE) - putchar('\a'); putchar('\n'); fflush(stdout); - } else { - putchar('\a'); - fflush(stdout); } return 0; } -- 1.7.1 -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (x86_64) Kernel: Linux 2.6.36-rc7+ (SMP w/4 CPU cores) Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/dash Versions of packages iputils-ping depends on: ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib ii libssl0.9.8 0.9.8o-2 SSL shared libraries iputils-ping recommends no packages. iputils-ping suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org