From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  4-FEB-1989 22:55
To:	MRGATE::"ARISIA::EVERHART"
Subj:	bug fix for ANU NEWS V5.7


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Sat,  4 FEB 89 19:30:31 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Sat, 4 Feb 89 19:20:39 PST
Received: by ucbvax.Berkeley.EDU (5.61/1.33)
	id AA17335; Sat, 4 Feb 89 19:16:29 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 2 Feb 89 08:35:07 GMT
From: munnari!otc!metro!ditsyda!natmlab!basser!usage!ccadfa!anucsd!csc3!csc!gih900@uunet.uu.net  (Geoff Huston)
Organization: VMS NEWS V5.2
Subject: bug fix for ANU NEWS V5.7
Message-Id: <1528@csc.anu.oz>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

There is an annoying bug in NEWS V5.7, which will affect all sites which were
running NEWS V5.6 or earlier, and have switched to V5.7:

NEWS will accvio almost immediately, when trying to read the old format
register file and converting it to a new format.

The fix is for users to delete their old register file (NEWS_GROUPS.REGISTER)
OR to apply the following patch to NEWSREGISTER.C.

I would advise installing the patch, as deleting the register file will then
require all users to re-register is their newsgroups, which is a pain to say
the least..

The patch to NEWSREGISTER.C is as follows:

Replace the first lines of the function read_reg_file with the following...

read_reg_file()
{
    FILE *regr;
    char *inline,
         *itm_list,
         new_name[128],
         *old_dir_typ;
    int systime,
        f_itm,
        l_itm,
        g = 0,
        i,
        new_cg;
    GRP_MEM_PTR l_ga;

    if (!(regr = fopen(news_register,"r"))) {
        FILE *fpold;
        char buff[512];
        if (fpold = fopen("SYS$LOGIN:NEWS_GROUPS.REGISTER","r")) {
            regr = fopen(news_register,"w");
            while (fgets(buff,512,fpold)) fputs(buff,regr);
            fclose(fpold);
            fclose(regr);
            if (!(regr = fopen(news_register,"r"))) return(0);
            while (!delete("SYS$LOGIN:NEWS_GROUPS.REGISTER"));
            }
        else return(0);
        }


    if (!(inline = fgetl(regr))) return(0);

    ...

}
D

