summaryrefslogtreecommitdiffstats
path: root/lib/libftpio
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libftpio')
-rw-r--r--lib/libftpio/ftpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libftpio/ftpio.c b/lib/libftpio/ftpio.c
index 35f2b15..155f954 100644
--- a/lib/libftpio/ftpio.c
+++ b/lib/libftpio/ftpio.c
@@ -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
OpenPOWER on IntegriCloud