From c74d5145655e11b7e3d27ea28786401ec25eca45 Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 24 Jan 1995 00:41:11 +0000 Subject: Merge. --- usr.bin/ncftp/.cvsimport.sh | 6 +++--- usr.bin/ncftp/ftp.c | 4 ++-- usr.bin/ncftp/main.c | 5 +++-- usr.bin/ncftp/open.c | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/usr.bin/ncftp/.cvsimport.sh b/usr.bin/ncftp/.cvsimport.sh index 62f7706..d5702b3 100644 --- a/usr.bin/ncftp/.cvsimport.sh +++ b/usr.bin/ncftp/.cvsimport.sh @@ -1,5 +1,5 @@ #!/bin/sh -tar zxvf ncftp-1.9.1.tgz -cd ncftp-1.9.1 +tar zxvf ncftp-1.9.2.tgz +cd ncftp-1.9.2 rm Makefile -cvs import src/usr.bin/ncftp mgleason ncftp_1_9_1 +cvs import src/usr.bin/ncftp mgleason ncftp_1_9_2 diff --git a/usr.bin/ncftp/ftp.c b/usr.bin/ncftp/ftp.c index 5152b55..4cb8d8d 100644 --- a/usr.bin/ncftp/ftp.c +++ b/usr.bin/ncftp/ftp.c @@ -1883,11 +1883,11 @@ dataconn(char *mode) FILE *fp; int s, fromlen = sizeof (from); + if (using_pasv) + return( fdopen( data, mode )); #ifdef SOCKS s = Raccept(data, (struct sockaddr *) &from, &fromlen); #else - if (using_pasv) - return( fdopen( data, mode )); s = Accept(data, &from, &fromlen); #endif if (s < 0) { diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c index 8a59967..d7aa1b8 100644 --- a/usr.bin/ncftp/main.c +++ b/usr.bin/ncftp/main.c @@ -2,7 +2,7 @@ #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. */ @@ -345,8 +345,9 @@ Examples:\n\ makeargv(); /* setpeer uses this to tell if it was called from the cmd-line. */ eventnumber = 0L; - if (cmdOpen(margc, margv) != NOERR) + if (cmdOpen(margc, margv) != NOERR) { exit(1); + } } eventnumber = 1L; diff --git a/usr.bin/ncftp/open.c b/usr.bin/ncftp/open.c index 4be044d..23b017a 100644 --- a/usr.bin/ncftp/open.c +++ b/usr.bin/ncftp/open.c @@ -637,7 +637,8 @@ int cmdOpen(int argc, char **argv) if ((GetOpenOptions(argc, argv, &openopt) == USAGE) || ((result = Open(&openopt)) == USAGE)) return USAGE; - return (www ? result : NOERR); + /* Return an error if colon-mode/URL didn't work. */ + return (openopt.colonmodepath[0] != '\0' ? result : NOERR); } /* cmdOpen */ /* eof open.c */ -- cgit v1.1