From: Roger Wolff Date: Thu, 6 Oct 2011 00:00:00 +0000 (+0000) Subject: mtr v0.81 X-Git-Tag: v0.81^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b955477adae70b044a828e6c4d9e860504a8b8b3;p=thirdparty%2Fmtr.git mtr v0.81 - Moved to git. Testing git... source: ftp://ftp.bitwizard.nl/mtr/mtr-0.81.tar.gz --- diff --git a/NEWS b/NEWS index fad9f11..0e642d6 100644 --- 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 V0.78/0.79 some compilation fixes for BSD&others by diff --git a/configure.in b/configure.in index 0c8f966..2a2c8a2 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.80) +AM_INIT_AUTOMAKE(mtr, 0.81) AC_SUBST(GTK_OBJ) diff --git a/select.c b/select.c index a53017f..6604f49 100644 --- 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);