From:	ADVAX::"mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM" "William H. Glass"  5-MAR-1991 18:49:51.57
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: NNTP_XMIT oddities in V6.0-2/Multinet

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Tue, 5 Mar 91 18:48:45 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA12875 for ; Tue, 5 Mar 91 18:34:17 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA00697; Tue, 5 Mar 91 16:28:35 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9103052128.AA00697@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 2564; Tue, 05 Mar 91 15:29:52 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 1917; Tue, 05 Mar 91 15:29:48 CST
Date:         Tue, 5 Mar 91 07:14:22 GMT
Reply-To: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Subject:      Re: NNTP_XMIT oddities in V6.0-2/Multinet
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <1991Mar5.110131.1690@ucsvc.ucs.unimelb.edu.au>, jonathan@ucsvc.ucs.u
nimelb.edu.au writes:
>
> I have since tried telnet/port=119 which worked perfectly.  The transfer probl
em
> still exists, however.  Further, from time to time, it is impossible even to
> transfer, the debug file looking like this:
>
>   X> Try open channel to remote node
>   X> IHAVE <Mar.3.07.03.16.1991.1782@rutgers.rutgers.edu>< 1>
>   X> IHAVE <26034413@bfmny0.BFM.COM>< 1>
>   ...
>
> What does return status "1" mean?  (I don't seem to be able to find it in the
> docs).  This occurs even though I am able to telnet/port=119 successfully.
 
You won't find any status "1" in the docs because there isn't any.  This seems
to be NEWS's way of saying that it didn't get a response.  In looking at the
code, I can see two causes for this status.  First, a timeout while waiting
for a response, or second, a response that didn't start with a numeric value.
Actually, there are a couple of bugs in the code here.  The program is supposed
to give a decent error message if a timeout occurs.  The patches below will
fix those bugs.  The changes are in NNTP_XMIT.C.
 
Of course, none of this will help you with your problem.  It will just help
to give you a more accurate error message.
 
Bill Glass
 
________________________________________________________________________________
 
/*
 * nntp_read_line
 *
 * Read of 1 logical record from the net channel
 */
 
char lbuf[X_BUF_SIZE + 1] = {""};
 
int nntp_read_line(b,timer)     char *b; int timer;
{
  char *cp, *pp;
 
  *b = '\0';
  while (strlen(b) < 1024) {
    if (cp = strchr(lbuf,'\n')) {
      *cp = '\0';
      strcat(b,lbuf);
      strcat(b,"\n");
      ++cp;
      pp = lbuf;
      while (*pp++ = *cp++);
      return(1);
      }
    strcat(b,lbuf);
    if (!nntp_read(lbuf,timer)) return(0);
    }
  return(1);                    /* new */
}
 
 
 
 
 
 
 
 
 
/*
 *  wait_net_response
 *
 *  Wait for a response from remote system - cmd indicates that all text
 *  should be skipped until NNTP command response is obtained
 */
 
int wait_net_response(secs,cmd) int secs,cmd;
{
  if (nntp_read_line(ibuf,secs)) {
    if (!cmd) return(1);
    if (sscanf(ibuf,"%d",&cmd_code) == 1) {
      if ((cmd_code == 400) || (cmd_code == 205)) {
        close_net();
        return(0);
        }
      else return(cmd_code);
      }
    else return(1);                     /* new */
    }
  else return(0);                       /* new */
}
