Article View: news.software.nntp
Article #6659No streaming patch to unoff4
From: Alec H. Peterson
Date: Wed, 17 Apr 1996 00:00
Date: Wed, 17 Apr 1996 00:00
80 lines
3121 bytes
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 |
+------------------------------------+--------------------------------------+
Technical Details
Message-ID:
<4l3af8$i3l@panix4.panix.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-mailShow Full Headers
Complete Article Headers
Message-ID: <4l3af8$i3l@panix4.panix.com> Subject: No streaming patch to unoff4 Date: Wed, 17 Apr 1996 00:00:00 +0000 From: chuckie@panix.com (Alec H. Peterson) 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: 148010310 Distribution: inet Organization: Panix Public Access Internet and UNIX Newsgroups: news.software.nntp