Argh! Fix passive mode selection (again)

This commit is contained in:
Dag-Erling Smørgrav 2000-10-17 19:01:18 +00:00
parent e92fbe47e2
commit 8b9ba4668d

View File

@ -325,8 +325,9 @@ _ftp_transfer(int cd, char *oper, char *file,
verbose = (flags && strchr(flags, 'v'));
/* passive mode */
if (!pasv && (s = getenv("FTP_PASSIVE_MODE")) != NULL)
pasv = (strncasecmp(s, "no", 2) != 0);
if (!pasv)
pasv = ((s = getenv("FTP_PASSIVE_MODE")) == NULL ||
strncasecmp(s, "no", 2) != 0);
/* find our own address, bind, and listen */
l = sizeof sin;