🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21276

PATCH: Overview backlog + defect fix

#21276
From: Dale Ghent
Date: Fri, 05 Sep 1997 00:00
55 lines
2262 bytes
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).

		-Dale G.

======================================================================
*** 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: <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

Show Full Headers
Complete Article Headers
Message-ID: <34106E87.41C67EA6@elemental.org>
Subject: PATCH: Overview backlog + defect fix
Date: Fri, 05 Sep 1997 00:00:00 +0000
From: Dale Ghent <daleg-HATESSPAM@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: 270058643
Distribution: inet
Organization: The Secret Organization
Newsgroups: news.software.nntp