🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.xerox
Article #620

TCPFTP & Host Names

#620
From: Christopher Lane
Date: Fri, 18 Nov 1988 16:37
48 lines
2907 bytes
Starting with Lyric and continuing with Medley, we started not being able to
use TCP FTP with various of our Unix server hosts.  After pulling apart the
'Envos' TCPFTP LispLibrary module, I located the function causing the problem.

Apparently, the function \TCPFTP.INPUT behaves abnormally if your host name
has a "-" (hyphen) it.  All the hosts we lost contact with were Unix TCP-only
hosts with hyphens in their name.  Most recently, we lost contact with our
SUN4 when its name was changed to SUMEX-AIM several weeks ago.

The function continues to parse the TCPFTP command line well into the comment
portion and hits the hyphen and treats it as some kind of delimiter (i.e.
beyond the number in the "220 0 sumex-aim FTP server (SunOS 4.0/1) ready."
line).  However, for some reason yet to be explained, (FTPDEBUG T) makes the
problem go away.

The patched version of \TCPFTP.INPUT below fixes the problem and no evil side
effects from it have turned up yet (unfortunately we have to use Lyric sources
to patch Medley bugs).  However, it is a crude patch and I only recommend it
to sites that have lost contact with hosts due to hyphens in their names.  We,
of course, hope for an official Envos workaround for the problem.

- Christopher

PS: The only significant difference between the function below and the
original is the 'to 3' addition to the 'do' loop, other differences are due to
rewritting the function for clarity.  This assumes that TCPFTP command numbers
are less than 999, otherwise the '3' will need to be increased (or find the
real reason the loop doesn't terminate after the number is read).

(DEFINEQ

(\TCPFTP.INPUT
  [LAMBDA (STREAM)                     (* ; "Edited 17-Nov-88 15:16 by cdl")
    (DECLARE (GLOBALVARS FTPDEBUGFLG FTPDEBUGLOG))
    (LET (CCODE (RESULT 0))
         (to 3 do (SETQ CCODE (BIN STREAM))
                  [if (AND (GEQ CCODE (CHARCODE 0)) (LEQ CCODE (CHARCODE 9)))
                   then (SETQ RESULT (PLUS (TIMES RESULT 10)
                                           (DIFFERENCE CCODE (CHARCODE 0]
          repeatuntil (OR (EQ CCODE (CHARCODE SPACE)) (EQ CCODE (CHARCODE -))
                          (EQ CCODE 0))
          finally (if (EQ CCODE (CHARCODE -))
                   then (if FTPDEBUGFLG
                         then (printout FTPDEBUGLOG T "< " RESULT))
                        (DISCARDLINE STREAM)
                        (\TCPFTP.INPUT STREAM)))
         RESULT])
)
Technical Details
Message-ID: <625843426.A0175.KSL-1186-13.lane@SUMEX-AIM.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!think!ames!pasteur!ucbvax!SUMEX-AIM.STANFORD.EDU!lane

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!think!ames!pasteur!ucbvax!SUMEX-AIM.STANFORD.EDU!lane
From: lane@SUMEX-AIM.STANFORD.EDU (Christopher Lane)
Newsgroups: comp.sys.xerox
Subject: TCPFTP & Host Names
Message-ID: <625843426.A0175.KSL-1186-13.lane@SUMEX-AIM.Stanford.EDU>
Date: 18 Nov 88 16:37:54 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: info-1100@tut.cis.ohio-state.edu
Organization: The Internet
Lines: 48