🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Mike Bird Thu, 13 Jun 1996 00:00
INN: Faster Reader Handoffs
#8501
Author: Mike Bird
Date: Thu, 13 Jun 1996 00:00
58 lines
2342 bytes
This patch should speed up reader connection/handoff in INND.
We've done some basic testing but our problems have not been
as serious as many mentioned in this newsgroup.  We are
therefore offering this as ALPHA TEST software.

If you try this please let me know your results - good or bad.

--Mike

--- rc.c.SAFE	Wed Jun 12 15:52:42 1996
+++ rc.c	Wed Jun 12 15:37:12 1996
@@ -36,7 +36,7 @@
 STATIC char		RCnnrpd[] = _PATH_NNRPD;
 STATIC char		RCnnrqd[] = _PATH_NNQRD;
 STATIC char		RCnntpd[] = _PATH_NNTPD;
-STATIC CHANNEL		*RCchan;
+       CHANNEL		*RCchan;    /* Referenced in nc.c */
 STATIC REMOTEHOST	*RCpeerlist;
 STATIC int		RCnpeerlist;
 STATIC REMOTEHOST	*RCnolimitlist;

--- nc.c.SAFE	Wed Jun 12 15:52:48 1996
+++ nc.c	Wed Jun 12 15:37:55 1996
@@ -1090,6 +1090,23 @@
 		*/
 		(void)memcpy((POINTER)bp->Data, (POINTER)&bp->Data[cp->Rest], (SIZE_T)bp->Used);
 		cp->Rest = cp->Lastch = 0;
+		/* mgb@ims.mariposa.ca.us 96/06/12
+		   To speed up new connections, see if any are pending now */
+		{
+		    extern CHANNEL *RCchan;
+		    FDSET readmask;
+		    struct timeval notime;
+		    FD_ZERO(&readmask);
+		    FD_SET(RCchan->fd, &readmask);
+		    notime.tv_sec = notime.tv_usec = 0L;
+		    if (select(RCchan->fd+1, &readmask, (FDSET *)NULL,
+			       (FDSET *)NULL, &notime) > 0) {
+		        /* Update the "reasonably accurate" time. */
+		        if (GetTimeInfo(&Now) < 0)
+			    syslog(L_ERROR, "%s cant gettimeinfo %m", LogName);
+		        (*RCchan->Reader)(RCchan);
+		    }
+		}
 	    } else {
 		bp->Used = cp->Lastch = 0;
 		break;



----------------------------------------------------------
 Mike Bird          Tel: 209-742-5000   FAX: 209-966-3177
 President          POP: 209-742-5333   NOC: 209-742-9979 
 Iron Mtn Systems      http://www.ims.mariposa.ca.us/


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