From 8b9ba4668d9b38b2a3ac4c6c3e677b2fc9f596c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 17 Oct 2000 19:01:18 +0000 Subject: [PATCH] Argh! Fix passive mode selection (again) --- lib/libfetch/ftp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 2aeecbbb658b..83667ae42395 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;