]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
mtr v0.81 v0.81
authorRoger Wolff <r.e.wolff@bitwizard.nl>
Thu, 6 Oct 2011 00:00:00 +0000 (00:00 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 3 Feb 2013 20:45:38 +0000 (20:45 +0000)
 - Moved to git. Testing git...

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.81.tar.gz

NEWS
configure.in
select.c

diff --git a/NEWS b/NEWS
index fad9f118d1bc141bff6a64e24cc3739d792b1da2..0e642d6df988653ec633dd5baa6cde01d63742fd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,7 @@
 WHAT'S NEW?
+  V0.81 Fix for https://bugs.launchpad.net/mtr/+bug/776211
+        don't have time right now to integrate some submitted patches. 
+        Sorry.
   V0.80 Some compilation fixes for BSD by Jeremy Chadwick 
         <freebsd@jdc.parodius.com>
   V0.78/0.79 some compilation fixes for BSD&others by 
index 0c8f96667c635ec83146a563f7574750be1b24a5..2a2c8a2148eb19e16a39ec47dfcb694cdf4cda6a 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.80)
+AM_INIT_AUTOMAKE(mtr, 0.81)
 
 
 AC_SUBST(GTK_OBJ)
index a53017fb7d2a6d4d7c6ee9c79937ac62f0aeb678..6604f49ee7d26bb7bc04bce67a7c5fbf6ad8eabb 100644 (file)
--- a/select.c
+++ b/select.c
@@ -43,6 +43,8 @@ static struct timeval intervaltime;
 int display_offset = 0;
 
 
+#define GRACETIME (5 * 1000*1000)
+
 void select_loop(void) {
   fd_set readfd;
   int anyset = 0;
@@ -51,8 +53,11 @@ void select_loop(void) {
   int NumPing = 0;
   int paused = 0;
   struct timeval lasttime, thistime, selecttime;
+  struct timeval startgrace, stopgrace;
   int dt;
   int rv; 
+  int graceperiod = 0;
+
 
   gettimeofday(&lasttime, NULL);
 
@@ -87,7 +92,6 @@ void select_loop(void) {
        selecttime.tv_usec = 0;
       
        rv = select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
-
       } else {
        if(Interactive) display_redraw();
 
@@ -97,10 +101,21 @@ void select_loop(void) {
           (thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
            thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
          lasttime = thistime;
-         if(NumPing >= MaxPing && (!Interactive || ForceMaxPing))
-           return;
-         if (net_send_batch())
-           NumPing++;
+         if (!graceperiod) {
+           if(NumPing >= MaxPing && (!Interactive || ForceMaxPing)) {
+             graceperiod=1;
+              startgrace=thistime;
+             //gettimeofday (&startgrace, NULL);
+           }
+           if (net_send_batch())
+             NumPing++;
+          }
+       }
+       if (graceperiod) {
+        // gettimeofday(&thistime, NULL);
+         dt =        (thistime.tv_usec - startgrace.tv_usec) + 
+           1000000 * (thistime.tv_sec - startgrace.tv_sec);
+         if (dt > GRACETIME) return;
        }
 
        selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);