From: Roger Wolff Date: Sun, 25 Oct 1998 00:00:00 +0000 (+0000) Subject: mtr v0.24 X-Git-Tag: v0.24^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4778673ae504ec328560b8dd8a4b0aeee896d9af;p=thirdparty%2Fmtr.git mtr v0.24 - Fixed number of probes. Accidentally was counted per packet sent instead of per round of packets. source: ftp://ftp.bitwizard.nl/mtr/mtr-0.24.tar.gz --- diff --git a/configure.in b/configure.in index e866607..db69ac2 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.23) +AM_INIT_AUTOMAKE(mtr, 0.24) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff --git a/mtr.8 b/mtr.8 index ae2e2ae..ae209b0 100644 --- a/mtr.8 +++ b/mtr.8 @@ -93,7 +93,7 @@ Note that each running instance of .B mtr generates a significant amount of network traffic. Using .B mtr -at to measure the quality of your network may result in decreased +to measure the quality of your network may result in decreased network performance. .TP diff --git a/net.c b/net.c index 1769a41..a090928 100644 --- a/net.c +++ b/net.c @@ -348,7 +348,7 @@ extern struct timeval intervaltime; #include #include -void net_send_batch() { +int net_send_batch() { static int n_unknown = 10; static int at; @@ -367,10 +367,11 @@ void net_send_batch() { intervaltime.tv_usec = 1000000.0 * (wt - floor(wt)); at = 0; n_unknown = 10; - return; + return 1; } at++; + return 0; } diff --git a/net.h b/net.h index cae195e..a68677d 100644 --- a/net.h +++ b/net.h @@ -32,7 +32,7 @@ int net_percent(int at); int net_best(int at); int net_worst(int at); int net_avg(int at); -void net_send_batch(); +int net_send_batch(); void net_end_transit(); /* Added by Brian Casey, December 1997 bcasey@imagiware.com*/ diff --git a/select.c b/select.c index bf269c0..b79cfe6 100644 --- a/select.c +++ b/select.c @@ -89,8 +89,8 @@ void select_loop() { lasttime = thistime; if(NumPing >= MaxPing && !Interactive) break; - NumPing++; - net_send_batch(); + if (net_send_batch()) + NumPing++; } selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);