From owner-freebsd-mobile Wed Apr 19 19:37:21 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id 704E137B8CB for ; Wed, 19 Apr 2000 19:37:17 -0700 (PDT) (envelope-from efutch@nyct.net) Received: from bsd1.nyct.net (efutch@bsd1.nyct.net [204.141.86.3]) by mail.nyct.net (8.9.3/8.8.7) with ESMTP id WAA64738; Wed, 19 Apr 2000 22:38:09 -0400 (EDT) (envelope-from efutch@nyct.net) Date: Wed, 19 Apr 2000 22:37:11 -0400 (EDT) From: "Eric D. Futch" To: Ross A Lippert Cc: sean@stat.Duke.EDU, freebsd-mobile@FreeBSD.ORG Subject: Re: ftp passive? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org D'oh. I left a debugging printf in that last patch... here we go again... Index: src/lib/libftpio/ftpio.c =================================================================== RCS file: /home/ncvs/src/lib/libftpio/ftpio.c,v retrieving revision 1.33 diff -u -r1.33 ftpio.c --- src/lib/libftpio/ftpio.c 1999/09/28 13:33:13 1.33 +++ src/lib/libftpio/ftpio.c 2000/04/20 02:35:31 @@ -498,8 +498,12 @@ static void check_passive(FILE *fp) { - if (getenv("FTP_PASSIVE_MODE")) - ftpPassive(fp, TRUE); + char *cp; + cp = getenv("FTP_PASSIVE_MODE"); + if (!cp || (cp && (strncmp(cp,"NO",2)==0))) + ftpPassive(fp, FALSE); + if (cp && (strncmp(cp,"YES",3)==0)) + ftpPassive(fp, TRUE); } -- Eric Futch New York Connect.Net, Ltd. efutch@nyct.net Technical Support Staff http://www.nyct.net (212) 293-2620 "Bringing New York The Internet Access It Deserves" On Wed, 19 Apr 2000, Eric D. Futch wrote: >I was just digging around in the libftpio source code. It does only check >to see if the FTP_PASSIVE_MODE environment variable is defined at all. I >made this small patch to it that I think makes enough sense almost to have >it comitted. With this patch it makes libftpio also understand the >YES or NO value of FTP_PASSIVE_MODE. It's a diff against >src/lib/libftpio.c rev 1.33 from 4.0-STABLE. Check out this patch and let >me know if it works for you. The if statements could probably be cleaned >up a little :), but it works. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message