Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2000 22:37:11 -0400 (EDT)
From:      "Eric D. Futch" <efutch@nyct.net>
To:        Ross A Lippert <ripper@plato.nmia.com>
Cc:        sean@stat.Duke.EDU, freebsd-mobile@FreeBSD.ORG
Subject:   Re: ftp passive?
Message-ID:  <Pine.BSF.4.21.0004192236150.60586-100000@bsd1.nyct.net>
In-Reply-To: <Pine.BSF.4.21.0004192230330.60586-100000@bsd1.nyct.net>

next in thread | previous in thread | raw e-mail | index | archive | help
D'oh.  I left a debugging printf in that last patch... here we go again...

Index: src/lib/libftpio/ftpio.c
===================================================================
RCS file: /home/ncvs/src/lib/libftpio/ftpio.c,v
retrieving revision 1.33
diff -u -r1.33 ftpio.c
--- src/lib/libftpio/ftpio.c    1999/09/28 13:33:13     1.33
+++ src/lib/libftpio/ftpio.c    2000/04/20 02:35:31
@@ -498,8 +498,12 @@
 static void
 check_passive(FILE *fp)
 {
-    if (getenv("FTP_PASSIVE_MODE"))
-       ftpPassive(fp, TRUE);
+    char *cp;
+    cp = getenv("FTP_PASSIVE_MODE");
+    if (!cp || (cp && (strncmp(cp,"NO",2)==0)))
+        ftpPassive(fp, FALSE);
+    if (cp && (strncmp(cp,"YES",3)==0))
+        ftpPassive(fp, TRUE);
 }


--
Eric Futch              New York Connect.Net, Ltd.
efutch@nyct.net         Technical Support Staff
http://www.nyct.net     (212) 293-2620
"Bringing New York The Internet Access It Deserves"


On Wed, 19 Apr 2000, Eric D. Futch wrote:

>I was just digging around in the libftpio source code.  It does only check
>to see if the FTP_PASSIVE_MODE environment variable is defined at all.  I
>made this small patch to it that I think makes enough sense almost to have
>it comitted.  With this patch it makes libftpio also understand the
>YES or NO value of FTP_PASSIVE_MODE.  It's a diff against
>src/lib/libftpio.c rev 1.33 from 4.0-STABLE.  Check out this patch and let
>me know if it works for you.  The if statements could probably be cleaned
>up a little :), but it works.
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004192236150.60586-100000>