INN commit: trunk/innfeed (endpoint.c)

INN Commit rra at isc.org
Fri Jun 24 16:59:14 UTC 2011


    Date: Friday, June 24, 2011 @ 09:59:14
  Author: iulius
Revision: 9211

fix a bug in the frequency innfeed logs its status

innfeed was printing lots of useless lines to news.notice.

TMRnow() doesn't return the current time, as innfeed was assuming in the
code, but the readily usable number of milliseconds since the last call
to TMRsummary() or TMRinit().

Thanks to Florian Schlichting for the patch.

Modified:
  trunk/innfeed/endpoint.c

------------+
 endpoint.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

Modified: endpoint.c
===================================================================
--- endpoint.c	2011-06-14 19:23:14 UTC (rev 9210)
+++ endpoint.c	2011-06-24 16:59:14 UTC (rev 9211)
@@ -583,7 +583,6 @@
   fd_set rSet ;
   fd_set wSet ;
   fd_set eSet ;
-  unsigned long last_summary = 0 ;
 
   keepSelecting = 1 ;
   xsignal (SIGPIPE, pipeHandler) ;
@@ -630,17 +629,10 @@
       TMRstop(TMR_IDLE);
 
       timePasses () ;
-      if (innconf->timer != 0)
-        {
-	  unsigned long now = TMRnow () ;
-	  if (last_summary == 0 
-	      || (now - last_summary) > (innconf->timer * 1000))
-	    {
-	      TMRsummary ("ME", timer_name) ;
-	      last_summary = now;
-	    }
-	}
-      
+      if (innconf->timer != 0 && TMRnow() > innconf->timer * 1000) {
+          TMRsummary ("ME", timer_name);
+      }
+
       if (sval == 0 && twait == NULL)
         die ("No fd's ready and no timeouts") ;
       else if (sval < 0 && errno == EINTR)




More information about the inn-committers mailing list