- Refresh patches and simplify spec file a bit OBS-URL: https://build.opensuse.org/request/show/1109255 OBS-URL: https://build.opensuse.org/package/show/network:utilities/mirror?expand=0&rev=15
47 lines
943 B
Diff
47 lines
943 B
Diff
Index: mirror-2.9/ftp.pl
|
|
===================================================================
|
|
--- mirror-2.9.orig/ftp.pl
|
|
+++ mirror-2.9/ftp.pl
|
|
@@ -270,6 +270,13 @@ sub ftp'set_signals
|
|
$SIG{ 'PIPE' } = "ftp'ftp__sighandler";
|
|
}
|
|
|
|
+# Setup a signal handler for user interrupts.
|
|
+sub ftp'set_user_signals
|
|
+{
|
|
+ $ftp_logger = @_;
|
|
+ $SIG{ 'INT' } = "ftp'ftp__sighandler";
|
|
+}
|
|
+
|
|
# &ftp'set_namemap( function to map outgoing name, function to map incoming )
|
|
sub ftp'set_namemap
|
|
{
|
|
@@ -279,7 +286,6 @@ sub ftp'set_namemap
|
|
}
|
|
}
|
|
|
|
-
|
|
# &ftp'open( hostname or address,
|
|
# port to use,
|
|
# retry on call failure,
|
|
@@ -581,6 +587,9 @@ sub ftp'dir_close
|
|
return 0;
|
|
}
|
|
|
|
+ # shut down our end of the socket
|
|
+ &close_data_socket;
|
|
+
|
|
# read the close
|
|
#
|
|
$ret = &expect($timeout,
|
|
@@ -590,9 +599,6 @@ sub ftp'dir_close
|
|
$ret = 0;
|
|
}
|
|
|
|
- # shut down our end of the socket
|
|
- &close_data_socket;
|
|
-
|
|
if( ! $ret ){
|
|
return 0;
|
|
}
|