diff options
author | des <des@FreeBSD.org> | 2000-10-17 19:01:18 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-10-17 19:01:18 +0000 |
commit | 328bdfc32260edf36595ea2198392204065f0b1f (patch) | |
tree | 4a04631b5438ec8e60bff712c55bbec10aafd9dc /lib | |
parent | 621e1df6d1865040fef93d09b0907b0809081c74 (diff) | |
download | FreeBSD-src-328bdfc32260edf36595ea2198392204065f0b1f.zip FreeBSD-src-328bdfc32260edf36595ea2198392204065f0b1f.tar.gz |
Argh! Fix passive mode selection (again)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfetch/ftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 2aeecbb..83667ae 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -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; |