Article View: news.software.nntp
Article #8501INN: Faster Reader Handoffs
From: Mike Bird
Date: Thu, 13 Jun 1996 00:00
Date: Thu, 13 Jun 1996 00:00
58 lines
2342 bytes
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, ¬ime) > 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/
Technical Details
Message-ID:
<4pnml9$clb@news.ims.mariposa.ca.us>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: <4pnml9$clb@news.ims.mariposa.ca.us> Subject: INN: Faster Reader Handoffs Date: Thu, 13 Jun 1996 00:00:00 +0000 From: mgb@ims.mariposa.ca.us (Mike Bird) 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: 159870794 Organization: Iron Mtn Systems Newsgroups: news.software.nntp