From:	AITGW::"GIH900%SAO.AARNET.EDU.AU@VM1.NoDak.EDU" "Geoff Huston"  8-NOV-1991 21:33:27.85
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: NNTP not remotely sending locally posted items [+WORKAROUND]

Received: by AITGW.DECnet (utk-mail11 v1.5) ; Fri, 8 Nov 91 21:33:45 EST
Received: from vm1.NoDak.edu by aitgw.ge.com (5.65/GE Gateway 1.4)
	id AA21594; Fri, 8 Nov 91 21:33:30 -0500
Message-Id: <9111090233.AA21594@aitgw.ge.com>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 8560; Fri, 08 Nov 91 20:32:13 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 8622; Fri, 08 Nov 91 20:32:12 CST
Date:         Fri, 8 Nov 1991 20:32:05 TZONE
Reply-To: Geoff Huston <GIH900%SAO.AARNET.EDU.AU@VM1.NoDak.EDU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Geoff Huston <GIH900%SAO.AARNET.EDU.AU@VM1.NoDak.EDU>
Subject:      Re: NNTP not remotely sending locally posted items [+WORKAROUND]
X-To:         ANU-NEWS@VM1.NODAK.EDU
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
Ben Cohen correctly points out that sys$scratch may not be defined for the
NNTP server process, causing subsequent problems with the posting code.
 
He suggests that the code shuld define sys$scratch if not already defined
as part of the startup cpde:
 
i.e. in NNTP_SERVER.C in server_init:...
 
 
server_init(max_stms)
  int max_stms;
{
  char *np;
  int i;
  unsigned short len;
  struct crelnm_record {
        short bl;
        short ic;
        char *ba;
        unsigned short *rl;
        int enditm;
        } scritm;
 
  if (!getenv("SYS$SCRATCH")) {
    scritm.ic = LNM$_STRING;
    scritm.ba = "NEWS_MANAGER";
    scritm.bl = strlen(scritm.ba);
    scritm.rl = &len;
    scritm.enditm = 0;
    c$cks(sys$crelnm(0,c$dsc("LNM$PROCESS"),c$dsc("SYS$SCRATCH"),0,&scritm));
    }
 
  if (np = getenv("NNTP_SCRATCH"))
 strcpy(scratchfile,"NNTP_SCRATCH:NNTP_%X_%X.TMP");
  else if (!getenv("SYS$SCRATCH"))
 strcpy(scratchfile,"NEWS_MANAGER:NNTP_%X_%X.TMP");
  else strcpy(scratchfile,"SYS$SCRATCH:NNTP_%X_%X.TMP");
 
 ...
}
