]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
mtr v0.24 v0.24
authorRoger Wolff <r.e.wolff@bitwizard.nl>
Sun, 25 Oct 1998 00:00:00 +0000 (00:00 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 3 Feb 2013 20:45:36 +0000 (20:45 +0000)
 - 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

configure.in
mtr.8
net.c
net.h
select.c

index e866607045dba4a19c301fbe33bfa12f297678d7..db69ac2336ee2771894a2d89ebfbb3f85e6e963c 100644 (file)
@@ -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 ae2e2ae3599a10d3039efd2314d73771e13ae977..ae209b0b2cc23b46e1f0fb80dba75596cabe0e1b 100644 (file)
--- 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 1769a41ed31a846f60c6ceddb428e0d2cc0f613b..a090928ddbbe9e44bd8e0c34fec5be7ea84bb9a7 100644 (file)
--- a/net.c
+++ b/net.c
@@ -348,7 +348,7 @@ extern struct timeval intervaltime;
 #include <stdio.h>
 #include <math.h>
 
-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 cae195ec72416329af23489acda11f553ce059a1..a68677d278d1c41917c7c0c92ef187ae498e056b 100644 (file)
--- 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*/
index bf269c0278763c40f7e8163ebc58b3337d8b8ef3..b79cfe6fbadf028297b2d29b4bfdbf0f3a212d91 100644 (file)
--- 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);