[BusyBox-cvs] busybox/networking ping.c,1.52,1.53 ping6.c,1.2,1.3
Erik Andersen
andersen at codepoet.org
Sun Jan 12 06:08:37 UTC 2003
Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv12705
Modified Files:
ping.c ping6.c
Log Message:
Kiss Gabor noticed that ping compiled without BB_FEATURE_FANCY_PING
would return 0 instead of EXIT_FAILURE when no response was received.
Index: ping.c
===================================================================
RCS file: /var/cvs/busybox/networking/ping.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ping.c 6 Jun 2002 11:47:00 -0000 1.52
+++ ping.c 12 Jan 2003 06:08:33 -0000 1.53
@@ -179,7 +179,7 @@
static void noresp(int ign)
{
printf("No response from %s\n", hostname);
- exit(0);
+ exit(EXIT_FAILURE);
}
static void ping(const char *host)
Index: ping6.c
===================================================================
RCS file: /var/cvs/busybox/networking/ping6.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ping6.c 26 Nov 2002 03:03:41 -0000 1.2
+++ ping6.c 12 Jan 2003 06:08:33 -0000 1.3
@@ -77,6 +77,11 @@
/* simple version */
#ifndef CONFIG_FEATURE_FANCY_PING6
+void noresp(int ign)
+{
+ printf("No response from %s\n", h->h_name);
+ exit(EXIT_FAILURE);
+}
static void ping(const char *host)
{
@@ -86,12 +91,6 @@
int pingsock, c;
int sockopt;
char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];
-
- void noresp(int ign)
- {
- printf("No response from %s\n", h->h_name);
- exit(0);
- }
pingsock = create_icmp6_socket();
More information about the busybox-cvs
mailing list