From:	ADVAX::"mcnc!VM1.NoDak.EDU!gih900%SAO.AARNET.EDU.AU0"  2-JUL-1990 20:14:59.29
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: nntp & multinet - and an important R3/R3 bug fix

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Mon, 2 Jul 90 20:18:15 EDT
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.12) with UUCP
	id AA01365 for everhart; Mon, 2 Jul 90 20:18:05 -0400
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA29545; Mon, 2 Jul 90 17:26:35 EDT
Message-Id: <9007022126.AA29545@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 5092; Mon, 02 Jul 90 16:22:27 CDT
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 5083; Mon, 02 Jul 90 16:22:26 CDT
Date:         Mon, 2 Jul 90 11:16:04 GMT
Reply-To: mcnc!VM1.NoDak.EDU!gih900%SAO.AARNET.EDU.AU0
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!gih900%SAO.AARNET.EDU.AU0
Subject:      Re: nntp & multinet - and an important R3/R3 bug fix
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <1990Jul2.094046.11941@uniwa.uwa.oz>, toivo@uniwa.uwa.oz (Toivo Pedas
te) writes:
>
> Is there some trick in geting anu-news to serve some groups off a
> unix host. We are running anu-news V6.0 beta (r2 I think) with
> multinet talking to nntpd 4.8.2 on and Utrix system. When I define
> a group as served it goes and connects to nntpd and produces a
> number of articles with subject unavailable type messages followed
> by a number of articles with the proper subject. The total number
> of articles shown in the group are a lot less than exist on the
> Ultrix system. Any suggestions.
 
I remember this problem, and I _think_ I made some changes to address it
but I'm really not sure.
 
I would advise moving onto R3 and using the diskless client software - its as
fast, requires minimal setup, and does not need the maintenance of local
indexed files which are a real pain.
 
R2 also supports this using
 
  NEWS/NETSERVER=nodename/NETP=tcp
 
I have also added code that gets the size and post dates to the client in R# (I
think - it gets a bit confusing) - the commands are SHOW LINE and SHOW POST if
they are in that version.
 
 
BTW theres a problem in the R3 PRINT command - it deletes items! (oops)
(nad R2 I think as well)
 
the change to submit_it (NEWSEXTRACT.C) is:
 
submit_it(g,m)
  int g, m;
{
  char full_name[256], prompt[256];
  int i, del_file = 0;
  FILE *fp;
 
  if (!more_submit) return;
  if (!ga[g]->grp_ia) map_items(g);
  if (!ga[g]->grp_ia) return;
  if (print_directory) return(dir_entry(g,m));
 
  if (!(fp = do_open_item(g,m,"r",fp_open))) return;
  sprintf(prompt,"%s #%d",ga[g]->grp_name,ga[g]->grp_ia[m].itm_num);
  if ((i = ask_confirm(prompt)) & 1) {
    FILE *fpw;
    int do_rotit = 0;
    char  xfrbuf[512], new_file_name[256];
 
    fgetname(fp,full_name);
    if (rot13_sw || ga[g]->grp_flags & NEWS_M_RESTRICT_SET) {
      sprintf(new_file_name,"SYS$SCRATCH:NEWS_%X_%X_PRINT.TMP",getpid(),time(0))
;
      fpw = fopen(new_file_name,"w");
      while (fgets(xfrbuf,510,fp)) {
        if (*xfrbuf == '\n') do_rotit = rot13_sw;
        if (do_rotit) {
          char *a = xfrbuf;
 
          while (*a) {
            if ((*a >= 'A') && (*a <= 'Z')) *a = ((*a - 'A' + 13) % 26) + 'A';
            if ((*a >= 'a') && (*a <= 'z')) *a = ((*a - 'a' + 13) % 26) + 'a';
            ++a;
            }
          }
        fputs(xfrbuf,fpw);
        }
      fclose(fpw);
      fclose(fp);
      strcpy(full_name,new_file_name);
      del_file = 1;
      }
    else if (nntp_client || *fp_open > 1) {
      fclose(fp);
      sprintf(new_file_name,"SYS$SCRATCH:NEWS_%X_%X_PRINT.TMP",getpid(),time(0))
;
      if (rename(full_name,new_file_name)) {
        fpw = fopen(new_file_name,"w");
        fp = fopen(full_name,"r");
        while (fgets(xfrbuf,510,fp)) fputs(xfrbuf,fpw);
        fclose(fpw);
        fclose(fp);
        }
      strcpy(full_name,new_file_name);
      del_file = 1;
      }
    else fclose(fp);
    sjc_add_file(full_name,del_file);
    ++n_extracted;
    }
  else {
    fclose(fp);
    if (*fp_open > 1) delete(fp_open);
    }
  *fp_open = '\0';
  return(more_submit = i);
}
 
Geoff
