🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
4 messages
4 total messages Started by Carlos Castro Fri, 12 Apr 1996 00:00
patch for > flag for the newsfeeds file
#6504
Author: Carlos Castro
Date: Fri, 12 Apr 1996 00:00
92 lines
3342 bytes
Good day,

  I have been getting complaints from many of my customers saying that
they are not getting all their articles.  After tracing the nntplinks
and innxmits to their sites, I noticed that most articles move quite 
nicely, but the large ones can take upto a minute to transmit.  

  I then decided to open up 2 channels to each down-stream site one
for articles greater than 5KB, and one for articles of size less than
5KB.  Looking at the man page for newsfeeds, I was only able to find
the less than part of what I want to try, so I added a few lines to
the source, and did some minor testing and everything is going well.

  I plan on using one of my customers to test this out.  Basically
I will change his newsfeeds file entry from

site/exclude\
	:*,!imci.*,clari.*\
	:Tc,Wnm,S5000:/opt/news/bin/nntplink -q fqdn

To 

site/exclude\
        :*,!imci.*,clari.*\     
        :Tc,Wnm,S5000,<5000:/opt/news/bin/nntplink -q fqdn

SITE/exclude\
        :*,!imci.*,clari.*\     
        :Tc,Wnm,S5000,>5000:/opt/news/bin/nntplink -q fqdN

  I made this patch using INN1.4unoff2 and then patched INN1.4unoff3.
It seems to work fine on unoff2 and unoff3.  I suspect it will work
fine against unoff4 aswell.  

  Here is the patch:


diff -c innd.old/art.c innd/art.c
*** innd.old/art.c	Mon Aug  7 13:42:24 1995
--- innd/art.c	Fri Apr 12 11:41:59 1996
***************
*** 1536,1541 ****
--- 1536,1545 ----
  	if (sp->Master != NOSITE && Sites[sp->Master].Seenit)
  	    continue;
  
+ 	if (sp->MinSize && sp->MinSize > Data->SizeValue)
+ 	    /* Too small for the site. */
+ 	    continue;
+ 
  	if (sp->MaxSize && sp->MaxSize < Data->SizeValue)
  	    /* Too big for the site. */
  	    continue;
diff -c innd.old/innd.h innd/innd.h
*** innd.old/innd.h	Fri Apr 12 11:35:41 1996
--- innd/innd.h	Fri Apr 12 11:40:59 1996
***************
*** 216,221 ****
--- 216,222 ----
      char		*Param;
      char		FileFlags[FEED_MAXFLAGS + 1];
      long		MaxSize;
+     long		MinSize;
      CHANNEL		*Channel;
      BOOL		IsMaster;
      int			Master;
diff -c innd.old/newsfeeds.c innd/newsfeeds.c
*** innd.old/newsfeeds.c	Fri Jul  7 18:01:25 1995
--- innd/newsfeeds.c	Fri Apr 12 11:42:27 1996
***************
*** 221,226 ****
--- 221,230 ----
  	    return "unknown field 3 flag";
  	case '\0':
  	    break;
+ 	case '>':
+ 	    if (*++p && CTYPE(isdigit, *p))
+ 		sp->MinSize = atol(p);
+ 	    break;
  	case '<':
  	    if (*++p && CTYPE(isdigit, *p))
  		sp->MaxSize = atol(p);
-- 
-----
Quigley's Law:
	Whoever has any authority over you, no matter how small, will
	atttempt to use it.
----------------------| News Administrator internetMCI
J. Carlos Castro      | carlos@mci.net


Re: patch for > flag for the newsfeeds file
#6514
Author: Marc G. Fournier
Date: Fri, 12 Apr 1996 00:00
62 lines
2493 bytes
carlos@mci.net (Carlos Castro) writes:

I did this here awhile ago, to pretty good results, but you
made on error that might only affect 1 article every once 
in a while.  what if the article is exactly <size> in size? :)

I've modified your diff directly to fix that, so that anything
that if sp->MinSize is >= instead of just >...

diff -c innd.old/art.c innd/art.c
*** innd.old/art.c	Mon Aug  7 13:42:24 1995
--- innd/art.c	Fri Apr 12 11:41:59 1996
***************
*** 1536,1541 ****
--- 1536,1545 ----
  	if (sp->Master != NOSITE && Sites[sp->Master].Seenit)
  	    continue;
  
+ 	if (sp->MinSize && sp->MinSize >= Data->SizeValue)
+ 	    /* Too small for the site. */
+ 	    continue;
+ 
  	if (sp->MaxSize && sp->MaxSize < Data->SizeValue)
  	    /* Too big for the site. */
  	    continue;
diff -c innd.old/innd.h innd/innd.h
*** innd.old/innd.h	Fri Apr 12 11:35:41 1996
--- innd/innd.h	Fri Apr 12 11:40:59 1996
***************
*** 216,221 ****
--- 216,222 ----
      char		*Param;
      char		FileFlags[FEED_MAXFLAGS + 1];
      long		MaxSize;
+     long		MinSize;
      CHANNEL		*Channel;
      BOOL		IsMaster;
      int			Master;
diff -c innd.old/newsfeeds.c innd/newsfeeds.c
*** innd.old/newsfeeds.c	Fri Jul  7 18:01:25 1995
--- innd/newsfeeds.c	Fri Apr 12 11:42:27 1996
***************
*** 221,226 ****
--- 221,230 ----
  	    return "unknown field 3 flag";
  	case '\0':
  	    break;
+ 	case '>':
+ 	    if (*++p && CTYPE(isdigit, *p))
+ 		sp->MinSize = atol(p);
+ 	    break;
  	case '<':
  	    if (*++p && CTYPE(isdigit, *p))
  		sp->MaxSize = atol(p);
-- 
-- 
Marc G. Fournier | POP Mail  Telnet Acct  DNS Hosting
System           |  WWW Services   Database Services  | Knowledge, 
  Administrator  |                                    | Information and
 scrappy@ki.net  |      WWW: http://www.ki.net        | Communications, Inc

Re: patch for > flag for the newsfeeds file
#6541
Author: Tom Fitzgerald
Date: Sat, 13 Apr 1996 00:00
37 lines
1884 bytes
carlos@mci.net (Carlos Castro) writes:

>   I then decided to open up 2 channels to each down-stream site one
> for articles greater than 5KB, and one for articles of size less than
> 5KB.  Looking at the man page for newsfeeds, I was only able to find
> the less than part of what I want to try, so I added a few lines to
> the source, and did some minor testing and everything is going well.

> + 	if (sp->MinSize && sp->MinSize > Data->SizeValue)
> + 	    /* Too small for the site. */
> + 	    continue;
> + 
>   	if (sp->MaxSize && sp->MaxSize < Data->SizeValue)
>   	    /* Too big for the site. */
>   	    continue;

No big deal, but if the article size is exactly the threshhold size,
then you'll feed it twice.  You may want to change the > to >=, or
adjust the newsfeeds entry to:

> site/exclude\
>         :*,!imci.*,clari.*\     
>         :Tc,Wnm,S5000,<5000:/opt/news/bin/nntplink -q fqdn
> 
> SITE/exclude\
>         :*,!imci.*,clari.*\     
>         :Tc,Wnm,S5000,>5001:/opt/news/bin/nntplink -q fqdN

(Both of the ">" and "<" flags are counterintuitive, since they both
mean "greater/less than or equal to".)

-- 
Tom Fitzgerald   Thinking Machines Corp, Bedford MA, USA   A3FC3545C031E735
fitz@think.com   (617)276-0400 x4848                       3DE72FB31F6028D1

Re: patch for > flag for the newsfeeds file
#6585
Author: Jerry Aguirre
Date: Mon, 15 Apr 1996 00:00
20 lines
1569 bytes
In article <4km5tj$84a@news.internetmci.com> carlos@mci.net (Carlos Castro) writes:
[Regarding adding the ">" flag for inn newsfeeds)
>  I made this patch using INN1.4unoff2 and then patched INN1.4unoff3.
>It seems to work fine on unoff2 and unoff3.  I suspect it will work
>fine against unoff4 aswell.  

This patch is already included in inn1.4unoff4.  The code is corrected
so that "<" really is less than rather than less than or equal.  Thus
you need something like "<3001" in one feed and ">3000" in the other
so that there are no missing or duplicate articles.  While having a
greater than or equal might be slightly more useful the implied syntax
of ">" and "<" as well as the previous (slightly wrong) documentation
means that in the long run it will be better to fix the code rather than
the documentation.

Also included is the change to the newsfeeds man page and to the inncheck
script.  With out the latter change inncheck will flag all your "-big"
feeds.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads