Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2000 22:17:30 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Mike Heffner <mheffner@mailandnews.com>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/18103: [PATCH] FTP_PASSIVE_MODE and libftpio
Message-ID:  <20000419221730.A16110@orion.ac.hmc.edu>
In-Reply-To: <200004200500.WAA94523@freefall.freebsd.org>; from mheffner@mailandnews.com on Wed, Apr 19, 2000 at 10:00:04PM -0700
References:  <200004200500.WAA94523@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 19, 2000 at 10:00:04PM -0700, Mike Heffner wrote:
>  Maybe it should do the comparison without depending on the string case?
>  
>  How about this:
>  
>  {
>          char *cp;
>          cp = getenv("FTP_PASSIVE_MODE");
>          if (cp && strncasecmp(cp, "YES", 3)==0)
>                  ftpPassive(fp, TRUE);
>          else
>                  ftpPassive(fp, FALSE);
>  }

Why compleatly change the behavior of this variable?  Going from
"if(defined) then true" to "if("YES") then true" is definatly a POLA
violation.  The obvious fix to allow NO to mean NO makes more sense.

{
	char *cp;
	cp = getenv("FTP_PASSIVE_MODE");
	if (cp && strncasecmp(cp, "NO", 3)==0)
		ftpPassive(fp, FALSE);
	else
		ftpPassive(fp, TRUE);
}

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000419221730.A16110>