From owner-freebsd-arch Fri May 19 2:29:15 2000 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 1DD9237BA75 for ; Fri, 19 May 2000 02:29:10 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id LAA62895; Fri, 19 May 2000 11:28:58 +0200 (CEST) (envelope-from des@flood.ping.uio.no) To: Hajimu UMEMOTO (=?iso-2022-jp?b?GyRCR19LXBsoQiAbJEJIJRsoQg==?=) Cc: arch@freebsd.org Subject: Re: fetch(1) References: <200005122016.e4CKGtF38185@peace.mahoroba.org> <200005161852.e4GIqhF74521@peace.mahoroba.org> <200005162001.e4GK1bF75342@peace.mahoroba.org> From: Dag-Erling Smorgrav Date: 19 May 2000 11:28:57 +0200 In-Reply-To: Hajimu UMEMOTO's message of "Wed, 17 May 2000 05:01:37 +0900 (JST)" Message-ID: Lines: 32 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hajimu UMEMOTO (梅本 肇) writes: > One more. > Fetch to ftp.openbsd.org fails with `999 Protocol error'. > Ftp.openbsd.org seems to return '230 ' without any trailing message. > [debugging output and patch deleted] Actually, the correct fix is: Index: ftp.c =================================================================== RCS file: /home/ncvs/src/lib/libfetch/ftp.c,v retrieving revision 1.19 diff -u -r1.19 ftp.c --- ftp.c 2000/05/15 08:24:58 1.19 +++ ftp.c 2000/05/19 09:25:59 @@ -100,7 +100,8 @@ static int last_code; #define isftpreply(foo) (isdigit(foo[0]) && isdigit(foo[1]) \ - && isdigit(foo[2]) && foo[3] == ' ') + && isdigit(foo[2]) \ + && (foo[3] == ' ' || foo[3] == '\0')) #define isftpinfo(foo) (isdigit(foo[0]) && isdigit(foo[1]) \ && isdigit(foo[2]) && foo[3] == '-') There are some places in ftp.c (e.g. the passive ftp code) that assume there is text after the status code; I'll see what I can do to fix them. DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message