INN commit: branches/2.5/innfeed (endpoint.c)

INN Commit rra at isc.org
Sun Jul 17 18:08:20 UTC 2011


    Date: Sunday, July 17, 2011 @ 11:08:20
  Author: iulius
Revision: 9253

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:
  branches/2.5/innfeed/endpoint.c

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

Modified: endpoint.c
===================================================================
--- endpoint.c	2011-07-17 18:07:31 UTC (rev 9252)
+++ endpoint.c	2011-07-17 18:08:20 UTC (rev 9253)
@@ -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