Add a feature: If the environment variable FTP_PASSIVE_MODE is defined

(the convention as established by pkg_install(1)), select passive mode
FTP automatically.
This commit is contained in:
Jordan K. Hubbard 1996-06-17 12:42:33 +00:00
parent abf58409aa
commit 1d2387de61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16426

View file

@ -14,7 +14,7 @@
* Turned inside out. Now returns xfers as new file ids, not as a special
* `state' of FTP_t
*
* $Id: ftp.c,v 1.14 1995/06/11 19:29:55 rgrimes Exp $
* $Id: ftpio.c,v 1.1.1.1 1996/06/17 12:26:06 jkh Exp $
*
*/
@ -328,6 +328,8 @@ ftp_new(void)
ftp->con_state = init;
ftp->errno = 0;
ftp->seek = 0;
if (getenv("FTP_PASSIVE_MODE"))
ftp->passive = 1;
return ftp;
}