Make FTP_PASSIVE_MODE check more specific.

Suggested by:	Eric D. Futch <efutch@nyct.net>
This commit is contained in:
Jordan K. Hubbard 2000-04-23 21:23:34 +00:00
parent 0e38cc420b
commit ca94ffbdf8

View file

@ -498,8 +498,9 @@ ftp_close_method(void *n)
static void
check_passive(FILE *fp)
{
if (getenv("FTP_PASSIVE_MODE"))
ftpPassive(fp, TRUE);
char *cp = getenv("FTP_PASSIVE_MODE");
ftpPassive(fp, (cp && !strncmp(cp, "YES", 3)));
}
static void