bin/120256: ftp(1): ftp -u URL/<file> <file> returns a -1 exit code on success

Jaakko Heinonen jh at saunalahti.fi
Wed Mar 19 08:20:04 UTC 2008


The following reply was made to PR bin/120256; it has been noted by GNATS.

From: Jaakko Heinonen <jh at saunalahti.fi>
To: bug-followup at FreeBSD.org, minear at securecomputing.com
Cc:  
Subject: Re: bin/120256: ftp(1): ftp -u URL/<file> <file> returns a -1 exit
	code on success
Date: Wed, 19 Mar 2008 10:17:47 +0200

 --n8g4imXOkfNTN/H1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 
 Attached patch implements the suggested change. Can you please verify
 that it works as expected.
 
 -- 
 Jaakko
 
 --n8g4imXOkfNTN/H1
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="lukemftp-return-code.diff"
 
 Index: fetch.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/lukemftp/src/fetch.c,v
 retrieving revision 1.1.1.8
 diff -p -u -r1.1.1.8 fetch.c
 --- fetch.c	17 May 2005 03:11:26 -0000	1.1.1.8
 +++ fetch.c	19 Mar 2008 08:07:51 -0000
 @@ -1819,12 +1819,11 @@ auto_put(int argc, char **argv, const ch
  	if (uargc == 3) {
  		uargv[1] = argv[0];
  		put(uargc, uargv);
 -		goto cleanup_auto_put;
 -	}
 -
 -	for(; argv[0] != NULL; argv++) {
 -		uargv[1] = argv[0];
 -		mput(uargc, uargv);
 +	} else {
 +		for(; argv[0] != NULL; argv++) {
 +			uargv[1] = argv[0];
 +			mput(uargc, uargv);
 +		}
  	}
  	rval = 0;
  
 
 --n8g4imXOkfNTN/H1--


More information about the freebsd-bugs mailing list