From owner-freebsd-current Wed Apr 19 22:36:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail.nyct.net (bsd4.nyct.net [204.141.86.6]) by hub.freebsd.org (Postfix) with ESMTP id 0854B37BD92 for ; Wed, 19 Apr 2000 22:36:32 -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 BAA84037; Thu, 20 Apr 2000 01:37:25 -0400 (EDT) (envelope-from efutch@nyct.net) Date: Thu, 20 Apr 2000 01:36:25 -0400 (EDT) From: "Eric D. Futch" To: Tim Liddelow Cc: freebsd-current@freebsd.org Subject: Re: FTP_PASSIVE_MODE and libftpio In-Reply-To: <38FE93E9.656E5306@esec.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Maybe I didn't make it clear enough that fetch(1), and others uknown to me, that use libftpio behave differently than ftp(1). I could imagine that the current behaviour would cause confusion since ftp(1) checks the value of FTP_PASSIVE_MODE and acts appropriately and programs using libftpio do not. My whole point was getting ftp(1) and programs using libftpio to behave in the same manner. Maybe I'm just not explaining it right :), take a look at the following snippets... From src/usr.bin/ftp/main.c: if ((s = getenv("FTP_PASSIVE_MODE")) != NULL && strcasecmp(s, "no") != 0) passivemode = 1; if (strcmp(cp, "pftp") == 0) passivemode = 1; From src/lib/libftpio/ftpio.c if (getenv("FTP_PASSIVE_MODE")) ftpPassive(fp, TRUE); You can see how they differ in handling FTP_PASSIVE_MODE. Someone (sorry I can't remember your name :)) suggested a better way of doing the if... take a look at: http://quake.nyct.net/~efutch/FreeBSD/ftpio.c.patch-2 -- 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 Thu, 20 Apr 2000, Tim Liddelow wrote: >Looking at the patch, the only mod I would suggest is to preserve the current >behaviour; make it set passive mode if the variable is just defined (without >any value). If it is NO, sure, dont set passive mode, but set passive mode if >the variable is YES or no value. i.e. looking at the patch, change the last if >statement to just if (cp) and don't do the strncmp(). > >Just my $0.02. > >Cheers >Tim. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message