Upgrade. My recent fix applied by author.

This commit is contained in:
Andrey A. Chernov 1995-01-24 00:37:11 +00:00
parent 69bee0e6f2
commit b3e8cc7812
4 changed files with 18 additions and 8 deletions

View File

@ -1883,11 +1883,11 @@ dataconn(char *mode)
FILE *fp; FILE *fp;
int s, fromlen = sizeof (from); int s, fromlen = sizeof (from);
if (using_pasv)
return( fdopen( data, mode ));
#ifdef SOCKS #ifdef SOCKS
s = Raccept(data, (struct sockaddr *) &from, &fromlen); s = Raccept(data, (struct sockaddr *) &from, &fromlen);
#else #else
if (using_pasv)
return( fdopen( data, mode ));
s = Accept(data, &from, &fromlen); s = Accept(data, &from, &fromlen);
#endif #endif
if (s < 0) { if (s < 0) {

View File

@ -2,7 +2,7 @@
#define _main_c_ #define _main_c_
#define FTP_VERSION "1.9.1 (January 1, 1995)" #define FTP_VERSION "1.9.2 (January 20, 1995)"
/* #define BETA 1 */ /* If defined, it prints a little warning message. */ /* #define BETA 1 */ /* If defined, it prints a little warning message. */
@ -345,7 +345,9 @@ Examples:\n\
makeargv(); makeargv();
/* setpeer uses this to tell if it was called from the cmd-line. */ /* setpeer uses this to tell if it was called from the cmd-line. */
eventnumber = 0L; eventnumber = 0L;
(void) cmdOpen(margc, margv); if (cmdOpen(margc, margv) != NOERR) {
exit(1);
}
} }
eventnumber = 1L; eventnumber = 1L;

View File

@ -29,6 +29,7 @@ int anon_open = dANONOPEN;
/* Anonymous logins by default? */ /* Anonymous logins by default? */
int connected = 0; /* TRUE if connected to server */ int connected = 0; /* TRUE if connected to server */
/* If TRUE, set binary each connection. */ /* If TRUE, set binary each connection. */
int www = 0; /* TRUE if use URL */
Hostname hostname; /* Name of current host */ Hostname hostname; /* Name of current host */
RemoteSiteInfo gRmtInfo; RemoteSiteInfo gRmtInfo;
#ifdef GATEWAY #ifdef GATEWAY
@ -107,7 +108,7 @@ void InitOpenOptions(OpenOptions *openopt)
int GetOpenOptions(int argc, char **argv, OpenOptions *openopt) int GetOpenOptions(int argc, char **argv, OpenOptions *openopt)
{ {
int opt, www; int opt;
char *cp, *hostp, *cpath; char *cp, *hostp, *cpath;
/* First setup the openopt variables. */ /* First setup the openopt variables. */
@ -467,6 +468,7 @@ int Open(OpenOptions *openopt)
int siteInRC; int siteInRC;
char *user, *pass, *acct; char *user, *pass, *acct;
int login_verbosity, oldv; int login_verbosity, oldv;
int result = CMDERR;
macnum = 0; /* Reset macros. */ macnum = 0; /* Reset macros. */
@ -593,6 +595,7 @@ int Open(OpenOptions *openopt)
*/ */
(void) _cd(NULL); (void) _cd(NULL);
} }
result = NOERR;
break; /* we are connected, so break the redial loop. */ break; /* we are connected, so break the redial loop. */
/* end if we are connected */ /* end if we are connected */
} else { } else {
@ -606,7 +609,7 @@ int Open(OpenOptions *openopt)
disconnect(0, NULL); disconnect(0, NULL);
continue; /* Try re-dialing. */ continue; /* Try re-dialing. */
} }
return (NOERR); return (result);
} /* Open */ } /* Open */
@ -615,6 +618,7 @@ int Open(OpenOptions *openopt)
int cmdOpen(int argc, char **argv) int cmdOpen(int argc, char **argv)
{ {
OpenOptions openopt; OpenOptions openopt;
int result = NOERR;
/* If there is already a site open, close that one so we can /* If there is already a site open, close that one so we can
* open a new one. * open a new one.
@ -631,9 +635,10 @@ int cmdOpen(int argc, char **argv)
gRmtInfo.hasMDTM = 1; gRmtInfo.hasMDTM = 1;
if ((GetOpenOptions(argc, argv, &openopt) == USAGE) || if ((GetOpenOptions(argc, argv, &openopt) == USAGE) ||
(Open(&openopt) == USAGE)) ((result = Open(&openopt)) == USAGE))
return USAGE; return USAGE;
return NOERR; /* Return an error if colon-mode/URL didn't work. */
return (openopt.colonmodepath[0] != '\0' ? result : NOERR);
} /* cmdOpen */ } /* cmdOpen */
/* eof open.c */ /* eof open.c */

View File

@ -1,3 +1,6 @@
v1.9.2 - January 20, 1995. Another passive mode fix with the SOCKS library.
Trying to avoid going into the interactive shell if colon-mode fails.
v1.9.1 - January 1, 1995. Passive mode fix with the SOCKS library. v1.9.1 - January 1, 1995. Passive mode fix with the SOCKS library.
v1.9.0 - December 22, 1994. The program won't exit from the interactive shell v1.9.0 - December 22, 1994. The program won't exit from the interactive shell