[news.software.anu-news] OPEN newsgroup is broken in NEWS V5.9

sdroppers@pbs.uucp (10/21/89)

This is a bug report about the behavior of the OPEN command in NEWS V5.9A.  I
built this from sources obtained from Bob Sloane.  I got the base sources from
Bob then applied the DIFF/SLP files supplied by Geoff, then built NEWS.  I had
no problems with the build, after I found the NNTP_XFER.C file.

The Problem:

 OPEN <some_newsgroup> does not open the desired news group

The Workaround:

 SELECT <some_newsgroup>

Analysis:

When an OPEN command is parsed a check is made for the value of the command
line object NEWSGROUP, to see if the desired news group is the pseudo group
"MAIL".  If it is all goes well.  If the value of the NEWSGROUP command line
object (actually Parameter 1) is not MAIL and there is no class then the logic
drops into do_selgrp, which then drops into do_select.  do_select checks if a
parameter has been passed, and if not checks for the command line object
NEWSGROUP (again).  This check returns CLI$_ABSENT.  It appears that one cannot
"reparse" a command line object once it has been parsed the first time. 
Because of this the OPEN command acts as though no newsgroup value has been
passed.

The SELECT command works since control passes directly from the DCL parse to
do_select, thus avoiding the first attempt to get the value of the object
NEWSGROUP.

-- 
Seton Droppers  -- "Anything that I say is my opinion and not my employer's."
Public Broadcasting Service, 1320 Braddock Pl. Alexandria, VA 22314
(UUCP) ...{csed-1,ida.org,vrdxhq}!pbs!sdroppers
(VAX/VMS running DECUS UUCP 1.1, ANU News 5.8A)

gih900@UUNET.UU.NET (Geoff Huston) (11/25/89)

>This is a bug report about the behavior of the OPEN command in NEWS V5.9A.  I
>built this from sources obtained from Bob Sloane.  I got the base sources from
>Bob then applied the DIFF/SLP files supplied by Geoff, then built NEWS.
     
>The Problem:
>
> OPEN <some_newsgroup> does not open the desired news group
     
>When an OPEN command is parsed a check is made for the value of the command
>line object NEWSGROUP, to see if the desired news group is the pseudo group
>"MAIL".  If it is all goes well.  If the value of the NEWSGROUP command line
>object (actually Parameter 1) is not MAIL and there is no class then the logic
>drops into do_selgrp, which then drops into do_select.  do_select checks if a
>parameter has been passed, and if not checks for the command line object
>NEWSGROUP (again).  This check returns CLI$_ABSENT.  It appears that one cannot
>"reparse" a command line object once it has been parsed the first time.
>Because of this the OPEN command acts as though no newsgroup value has been
>passed.
     
     
This is NOT fixed in the 5.9B patches posted out yesterday - BUT will be fixed
in the 5.9C release. I have located and fixed the problem:
     
NEWSSELECT.C :
     
do_openit()
{
  char s[80];
  short s_l;
  $DESCRIPTOR(s_d,s);
     
  if (cli$get_value(c$dsc("NEWSGROUP"),&s_d,&s_l) & 1) {
    s[s_l] = '\0';
    s_to_lower(s);
    if (!strcmp(s,"mail")) return(do_open_mail());
    if (do_select(s,0,2)) selgrp_action();
    return(0);
    }
  if (cli$present(c$dsc("CLASSNAME")) & 1) return(do_set_class());
  return(do_selgrp());
}
     
     
Geoff Huston