3 --- ftp.pl.orig Fri Jun 5 05:10:27 1998
4 +++ ftp.pl Wed Apr 19 23:14:00 2000
8 print $showfd "proxy connection failed " if $proxy;
9 - print $showfd "Cannot open ftp to $connect_site\n" if $ftp_show;
10 + print $showfd "Cannot open ftp to $newhost:$newport\n" if $ftp_show;
15 $SIG{ 'PIPE' } = "ftp'ftp__sighandler";
18 +# Setup a signal handler for user interrupts.
19 +sub ftp'set_user_signals
22 + $SIG{ 'INT' } = "ftp'ftp__sighandler";
26 # &ftp'set_namemap( function to map outgoing name, function to map incoming )
33 - if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){
34 + if($response =~ m/^227 .*\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/){
35 $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
36 $newport = $5 * 256 + $6;
42 + # shut down our end of the socket
47 $ret = &expect($timeout,
52 - # shut down our end of the socket
58 if( ! $service_open ){
61 + chmod 0600, $loc_fname;
63 if( $loc_fname eq "" ){
64 $loc_fname = $rem_fname;