tags 352648 + upstream patch Hi, I wrote a patch for this and sent it upstream. Maybe it gets in. Kind regards Nico
-- Nico Golde - http://www.ngolde.de JAB: [EMAIL PROTECTED] - GPG: 0x73647CFF Forget about that mouse with 3/4/5 buttons, gimme a keyboard with 103/104/105 keys!
diff -Nurap httping-1.2.2/httping.1 httping-1.2.2-new/httping.1
--- httping-1.2.2/httping.1 2006-11-09 20:13:12.000000000 +0100
+++ httping-1.2.2-new/httping.1 2007-03-17 17:21:59.000000000 +0100
@@ -64,6 +64,9 @@ Connect using SSL: for this to work you
.B "\-z"
When connecting using SSL, display the fingerprint of the X509 certificate(s) of the peer.
.TP
+.B "\-a"
+Audible ping
+.TP
.B "\-f"
Flood ping: do not sit idle between each ping but ping as fast as the computer and network allow you to.
.TP
diff -Nurap httping-1.2.2/main.c httping-1.2.2-new/main.c
--- httping-1.2.2/main.c 2006-11-09 20:13:12.000000000 +0100
+++ httping-1.2.2-new/main.c 2007-03-17 17:21:23.000000000 +0100
@@ -78,6 +78,7 @@ void usage(void)
fprintf(stderr, "-z show fingerprint (SSL)\n");
#endif
fprintf(stderr, "-f flood connect (no delays)\n");
+ fprintf(stderr, "-a audible ping\n");
fprintf(stderr, "-m give machine parseable output (see\n");
fprintf(stderr, " also -o and -e)\n");
fprintf(stderr, "-o rc,rc,... what http results codes indicate 'ok'\n");
@@ -127,6 +128,7 @@ int main(int argc, char *argv[])
int c;
int count = -1, curncount = 0;
int wait = 1;
+ int audible = 0;
int ok = 0, err = 0;
double min = 999999999999999.0, avg = 0.0, max = 0.0;
int timeout=30;
@@ -164,7 +166,7 @@ int main(int argc, char *argv[])
buffer = (char *)mymalloc(page_size, "receive buffer");
- while((c = getopt(argc, argv, "y:XL:bBg:h:p:c:i:Gx:t:o:e:flqsmV?I:R:rn:N:z")) != -1)
+ while((c = getopt(argc, argv, "y:XL:bBg:h:p:c:i:Gx:t:o:e:falqsmV?I:R:rn:N:z")) != -1)
{
switch(c)
{
@@ -258,6 +260,10 @@ int main(int argc, char *argv[])
referer = optarg;
break;
+ case 'a':
+ audible = 1;
+ break;
+
case 'f':
wait = 0;
break;
@@ -679,7 +685,8 @@ int main(int argc, char *argv[])
{
printf("%s", err_str);
}
-
+ if(audible)
+ putchar('\a');
printf("\n");
}
else if (!quiet && !nagios_mode)
@@ -705,7 +712,8 @@ int main(int argc, char *argv[])
printf(" %s", fp);
free(fp);
}
-
+ if(audible)
+ putchar('\a');
printf("\n");
}
pgpNOdGpviXnc.pgp
Description: PGP signature

