INN commit: trunk/innd (art.c)

INN Commit Russ_Allbery at isc.org
Wed May 6 17:11:13 UTC 2009


    Date: Wednesday, May 6, 2009 @ 10:11:12
  Author: iulius
Revision: 8446

The Af flag was not working for funnel entries.

The problem is that at some point during ARTpropagate(), funnels are
removed in favour of what they point at (like innfeed!).  Therefore,
if "news.server.org" has the Af flag, this flag is not transmitted
to "innfeed!" (because it handles more than one site).  And when it
is time to send the article, "news.server.org" is no longer known
and the article ends up being transmitted to "innfeed!" which sends it
to "news.server.org".

Fix the code to check for the Af flag on funnels too.

Modified:
  trunk/innd/art.c

-------+
 art.c |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Modified: art.c
===================================================================
--- art.c	2009-05-04 19:57:12 UTC (rev 8445)
+++ art.c	2009-05-06 17:11:12 UTC (rev 8446)
@@ -1685,7 +1685,7 @@
 */
 static void
 ARTpropagate(ARTDATA *data, const char **hops, int hopcount, char **list,
-  bool ControlStore, bool OverviewCreated)
+  bool ControlStore, bool OverviewCreated, bool Filtered)
 {
   HDRCONTENT	*hc = data->HdrContent;
   SITE		*sp, *funnel;
@@ -1775,6 +1775,10 @@
 	continue;
     }
 
+    /* Handle dontrejectfiltered. */
+    if (Filtered && sp->DropFiltered)
+      continue;
+
     /* Write that the site is getting it, and flag to send it. */
     if (innconf->logsitename) {
       if (fprintf(Log, " %s", sp->Name) == EOF || ferror(Log)) {
@@ -2540,7 +2544,7 @@
   }
 
   ARTpropagate(data, (const char **)hops, hopcount, data->Distribution.List,
-    ControlStore, OverviewCreated);
+    ControlStore, OverviewCreated, Filtered);
 
   /* Now that it's been written, process the control message.  This has
    * a small window, if we get a new article before the newgroup message
@@ -2556,14 +2560,14 @@
     }
   }
 
-  /* And finally, send to everyone who should get it */
+  /* And finally, send to everyone who should get it.
+   * sp->Sendit is false for funnel sites:  ARTpropagate()
+   * transferred it to the corresponding funnel. */
   for (sp = Sites, i = nSites; --i >= 0; sp++) {
     if (sp->Sendit) {
-      if (!Filtered || !sp->DropFiltered) {
-	TMRstart(TMR_SITESEND);
-	SITEsend(sp, data);
-	TMRstop(TMR_SITESEND);
-      }
+      TMRstart(TMR_SITESEND);
+      SITEsend(sp, data);
+      TMRstop(TMR_SITESEND);
     }
   }
 




More information about the inn-committers mailing list