Article View: news.software.nntp
Article #21298Re: PATCH: Overview backlog + defect fix
From: Dale Ghent
Date: Fri, 05 Sep 1997 00:00
Date: Fri, 05 Sep 1997 00:00
57 lines
2348 bytes
2348 bytes
Dale Ghent (daleg-HATESSPAM@elemental.org) wrote:
: Hello all. The original Overview backlog patch didnt include a check on
: the channel buffer to keep it under control, so using the fix from
: Forrest's code, I've created a overview backlog patch that contains the
: buffer reset. This is for inn-1.5.1. Enjoy. (for those of you who used
: the orginial backlog patch, and had innd eat memory for lunch, this is
: prolly the fix you're looking for).
OOps, that patch was messed up in the cut-and-paste... time to use a real news
client. Here goes again:
===============================================================================
*** innd/site.c.orig Tue Dec 17 09:40:40 1996
--- innd/site.c Thu Sep 4 01:34:11 1997
***************
*** 260,267 ****
if (i < sp->StopWriting)
WCHANremove(cp);
if ((sp->StartWriting == 0 || i > sp->StartWriting)
! && !CHANsleeping(cp))
! WCHANadd(cp);
cp->LastActive = Now.time;
--- 260,287 ----
if (i < sp->StopWriting)
WCHANremove(cp);
if ((sp->StartWriting == 0 || i > sp->StartWriting)
! && !CHANsleeping(cp)) {
! if (sp->Type == FTchannel) { /* channel feed, try the write */
! int j;
! if (bp->Left == 0)
! return;
! j = write(cp->fd, (POINTER)&bp->Data[bp->Used], (SIZE_T)bp->Left);
! if (j > 0) {
! bp->Left -= j;
! bp->Used += j;
! i = cp->Out.Left;
! }
! if (bp->Left <= 0) {
! /* reset Used, Left on bp, keep channel buffer size from
! exploding. */
! bp->Used = bp->Left = 0;
! WCHANremove(cp);
! } else
! WCHANadd(cp);
! }
! else
! WCHANadd(cp);
! }
cp->LastActive = Now.time;
Technical Details
Message-ID:
<5uprbd$soa$1@news.fred.net>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-mailReferences:
<34106E87.41C67EA6@elemental.org>Show Full Headers
Complete Article Headers
Message-ID: <5uprbd$soa$1@news.fred.net> Subject: Re: PATCH: Overview backlog + defect fix Date: Fri, 05 Sep 1997 00:00:00 +0000 From: daleg@maximum.net (Dale Ghent) References: <34106E87.41C67EA6@elemental.org> 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: 270059779 X-Advice: Never hit a man with glasses. Hit him with a tire iron. Distribution: inet Organization: Secret Organization Newsgroups: news.software.nntp