🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #18309

INN Streaming flag fix (patch)

#18309
From: Jeff Garzik
Date: Fri, 06 Jun 1997 00:00
107 lines
4033 bytes
This is a multi-part message in MIME format.

--------------273CC61303058A36102F713
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hosts.nntp has a flag that allows you to control incoming streaming
support for each entry.  If you decide to use this feature, you have to
put a "/s" after *every* feed that can stream to you, like so:

news.stream.com/s:
news.more.com/s:
news.nostream.edu:

In INN 1.5.1, this doesn't work on hosts with multiple IPs in their DNS
entry -- which basically makes the flag useless if you get fed from any
multihomed server.  The attached patch fixes the bug.


Just as an aside, using this flag lets you shift the "momentum" of the
incoming articles.  If you rarely accept articles from a server, perhaps
disabling their streaming capability would give other feeds more I/O
time to send you articles.  Ditto for feeds with few articles, too.
-- 
Jeff Garzik
News Administrator, Spinne, Inc.
http://www.spinne.com/usenet/

--------------273CC61303058A36102F713
Content-Type: text/plain; charset=us-ascii; name="streaming-fix.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="streaming-fix.patch"

*** ../inn-1.5.1/innd/rc.c	Tue Dec 17 09:40:40 1996
--- innd/rc.c	Fri Jun  6 07:55:40 1997
***************
*** 396,401 ****
--- 396,402 ----
      char		*pass;
      char		*pats;
      int			errors;
+     BOOL		host_is_streaming;
  
      /* Free anything that might have been there. */
      if (*list) {
***************
*** 452,457 ****
--- 453,460 ----
  	    pats = NULL;
  	}
  
+ 	host_is_streaming = FALSE ;
+ 
          /* Check if the host name ends with '/s' which means that streaming is
             specifically permitted (as opposed to defaulted). The default
             for the global StreamingOff is FALSE, meaning any host can use
***************
*** 462,475 ****
          if ((k = strlen(buff)) > 2) {
              if (buff[k - 1] == 's' && buff[k - 2] == '/') {
                  buff[k - 2] = '\0';
!                 rp->Streaming = TRUE;
                  StreamingOff = TRUE ;
              }
          }
  
  	/* Was host specified as as dotted quad? */
  	if ((rp->Address.s_addr = inet_addr(buff)) != (unsigned int) -1) {
   	  syslog(LOG_NOTICE, "think it's a dotquad: %s",buff);
  	    rp->Name = COPY(buff);
  	    rp->Password = COPY(pass);
  	    rp->Patterns = (pats && *pats) ? CommaSplit(COPY(pats)) : NULL;
--- 465,482 ----
          if ((k = strlen(buff)) > 2) {
              if (buff[k - 1] == 's' && buff[k - 2] == '/') {
                  buff[k - 2] = '\0';
! 		host_is_streaming = TRUE ;
                  StreamingOff = TRUE ;
              }
          }
  
+ 	rp->Streaming = host_is_streaming;
+ 
  	/* Was host specified as as dotted quad? */
  	if ((rp->Address.s_addr = inet_addr(buff)) != (unsigned int) -1) {
+ #if 0       /* Why would we want our logs to fill up with these messages? */
  	    syslog(LOG_NOTICE, "think it's a dotquad: %s",buff);
+ #endif
  	    rp->Name = COPY(buff);
  	    rp->Password = COPY(pass);
  	    rp->Patterns = (pats && *pats) ? CommaSplit(COPY(pats)) : NULL;
***************
*** 515,520 ****
--- 522,528 ----
  	    rp->Name = COPY(hp->h_name);
  	    rp->Password = COPY(pass);
  	    rp->Patterns = (pats && *pats) ? CommaSplit(COPY(pats)) : NULL;
+ 	    rp->Streaming = host_is_streaming;
  	    rp++;
  	}
  #else

--------------273CC61303058A36102F713--


Technical Details
Message-ID: <33981C11.6EE393B@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <33981C11.6EE393B@spinne.com>
Subject: INN Streaming flag fix (patch)
Date: Fri, 06 Jun 1997 00:00:00 +0000
From: Jeff Garzik <jeff.garzik@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 246550959
Organization: Spinne http://spinne.com
Newsgroups: news.software.nntp