🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Alec H. Peterson Wed, 17 Apr 1996 00:00
No streaming patch to unoff4
#6659
Author: Alec H. Peterson
Date: Wed, 17 Apr 1996 00:00
80 lines
3121 bytes
I just put together a patch to unoff4 that disallows streaming
(setable with a command-line option).  The patch literally tripled the
responsiveness of my news server.  The diffs are below.

[snip]
*** innd/innd.c.o       Wed Apr 17 13:35:03 1996
--- innd/innd.c Wed Apr 17 13:01:48 1996
***************
*** 36,41 ****
--- 36,42 ----
  int           ErrorCount = IO_ERROR_COUNT;
  int           MaxIncoming = DEFAULT_CONNECTIONS;
  int           SPOOLlen = STRLEN(SPOOL);
+ int           NoStream = 0;
  long          LargestArticle = MAX_ART_SIZE;
  OPERATINGMODE Mode = OMrunning;
  time_t                Cutoff = DEFAULT_CUTOFF * 24 * 60 * 60;
***************
*** 704,709 ****
--- 705,713 ----
            break;
        case 'x':
            AlwaysCrosspost = TRUE;
+           break;
+       case 'z':
+           NoStream = TRUE;
            break;
        }
      ac -= optind;

*** innd/innd.h.o       Wed Apr 17 13:36:28 1996
--- innd/innd.h Wed Apr 17 13:36:18 1996
***************
*** 395,400 ****
--- 395,401 ----
  EXTERN int            PROCneedscan;
  extern int            SPOOLlen;
  EXTERN int            Xrefbase;
+ extern int            NoStream;
  extern long           LargestArticle;
  EXTERN NEWSGROUP      **GroupPointers;
  EXTERN NEWSGROUP      *Groups;

*** innd/nc.c.o Wed Apr 17 13:36:33 1996
--- innd/nc.c   Wed Apr 17 13:37:30 1996
***************
*** 657,663 ****
        h = HOnnrqd;
      else if (caseEQ(p, "stream")) {
        char buff[16];
!       (void)sprintf(buff, "%d StreamOK.", NNTP_OK_STREAM_VAL);
          NCwritetext(cp, buff);
          syslog(L_NOTICE, "%s NCmode \"mode stream\" received",
                 CHANname(cp));
--- 657,666 ----
        h = HOnnrqd;
      else if (caseEQ(p, "stream")) {
        char buff[16];
!       if(!NoStream)
!         (void)sprintf(buff, "%d StreamOK.", NNTP_OK_STREAM_VAL);
!         else
!           (void)sprintf(buff, "%d No Stream", NNTP_BAD_COMMAND_VAL);
          NCwritetext(cp, buff);
          syslog(L_NOTICE, "%s NCmode \"mode stream\" received",
                 CHANname(cp));
[snip]

The option is '-z'.  No, no logic behind the option choice, but all
the good appropriate ones were taken.

Alec

-- 
+------------------------------------+--------------------------------------+
|Alec Peterson - chuckie@panix.com   | Panix Public Access Internet and UNIX|
|Network Administrator               | New York City, NY                    |
+------------------------------------+--------------------------------------+

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