INN commit: trunk (4 files)

INN Commit Russ_Allbery at isc.org
Thu Jan 8 19:15:53 UTC 2009


    Date: Thursday, January 8, 2009 @ 11:15:52
  Author: iulius
Revision: 8276

Fix an assertion failure in innfeed.
We have cases where all the connections to a host
are inactive and sleeping.  Therefore, cxn is still NULL
and passed to cxnCheckstate().

Thanks to William Kronert for the bug report.

close #121

Modified:
  trunk/CONTRIBUTORS
  trunk/innfeed/connection.c
  trunk/innfeed/connection.h
  trunk/innfeed/host.c

----------------------+
 CONTRIBUTORS         |    2 +-
 innfeed/connection.c |    2 +-
 innfeed/connection.h |    2 +-
 innfeed/host.c       |    6 ++++--
 4 files changed, 7 insertions(+), 5 deletions(-)

Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS	2009-01-08 19:13:00 UTC (rev 8275)
+++ CONTRIBUTORS	2009-01-08 19:15:52 UTC (rev 8276)
@@ -269,4 +269,4 @@
 D. Stussy, Alan Schwartz, Shalon Wood, Nick Couchman, Jakub Bogusz,
 J. Thomas Halliley, Matija Nalis, Geraint A. Edwards, Alexander Bartolich,
 David Hlacik, Andreas Mattheiss, James Ralston, Wim Lewis, Johan van Selst,
-Wolfgang M. Weyand, Berend Reitsma
+Wolfgang M. Weyand, Berend Reitsma, William Kronert

Modified: innfeed/connection.c
===================================================================
--- innfeed/connection.c	2009-01-08 19:13:00 UTC (rev 8275)
+++ innfeed/connection.c	2009-01-08 19:15:52 UTC (rev 8276)
@@ -1162,7 +1162,7 @@
 
 
 /*
- * return the number of articles the connection will accept.
+ * Return whether the connection will accept articles.
  */
 bool cxnCheckstate (Connection cxn)
 {

Modified: innfeed/connection.h
===================================================================
--- innfeed/connection.h	2009-01-08 19:13:00 UTC (rev 8275)
+++ innfeed/connection.h	2009-01-08 19:15:52 UTC (rev 8276)
@@ -110,7 +110,7 @@
 /* config file load callback */
 int cxnConfigLoadCbk (void *data) ;
 
-/* check connection state is in cxnWaitingS, cxnConnectingS or cxnIdleS */
+/* Check connection state is in cxnFeedingS, cxnIdleS or cxnConnectingS. */
 bool cxnCheckstate (Connection cxn) ;
 
 #endif /* connection_h__ */

Modified: innfeed/host.c
===================================================================
--- innfeed/host.c	2009-01-08 19:13:00 UTC (rev 8275)
+++ innfeed/host.c	2009-01-08 19:15:52 UTC (rev 8276)
@@ -1783,7 +1783,9 @@
       delArticle (extraRef) ;
           
       remArticle (article,&host->processed,&host->processedTail) ;
-      if (!cxnCheckstate (cxn))
+
+      /* cxn can be NULL if it has never been affected in the loop above. */
+      if (cxn == NULL || !cxnCheckstate (cxn))
         {
           host->artsToTape++ ;
           host->gArtsToTape++ ;
@@ -1793,7 +1795,7 @@
         }
     }
 
-  /* either all the per connection queues were full or we already had
+  /* Either all the peer connection queues were full or we already had
      a backlog, so there was no sense in checking. */
   queueArticle (article,&host->queued,&host->queuedTail, 0) ;
     




More information about the inn-committers mailing list