Attachment "ftp-nodns.patch" to
ticket [3325112fff]
added by
ferrieux
2011-06-24 05:36:14.
--- orig.ftp.tcl 2011-06-24 00:13:39.665831157 +0200
+++ ftp.tcl 2011-06-24 00:29:34.555591591 +0200
@@ -2872,6 +2872,12 @@ proc ::ftp::OpenActiveConn {s } {
return 0
}
+ # prepare local ip address for PORT command (convert pointed format
+ # to comma format)
+
+ set ftp(LocalAddr) [lindex [fconfigure $ftp(CtrlSock) -sockname] 0]
+ set ftp(LocalAddr) [string map {. ,} $ftp(LocalAddr)]
+
# get a new local port address for data transfer and convert it to a format
# which is useable by the PORT command
@@ -2957,17 +2963,10 @@ proc ::ftp::OpenControlConn {s {block 1}
fconfigure $ftp(CtrlSock) -buffering line -blocking $block -translation {auto crlf}
fileevent $ftp(CtrlSock) readable [list [namespace current]::StateHandler $s $ftp(CtrlSock)]
- # prepare local ip address for PORT command (convert pointed format
- # to comma format)
-
- set ftp(LocalAddr) [lindex [fconfigure $ftp(CtrlSock) -sockname] 0]
- set ftp(LocalAddr) [string map {. ,} $ftp(LocalAddr)]
-
# report ready message
- set peer [fconfigure $ftp(CtrlSock) -peername]
if { $VERBOSE } {
- DisplayMsg $s "C: Connection from [lindex $peer 0]:[lindex $peer 2]" control
+ DisplayMsg $s "C: Connection to $ftp(RemoteHost):$ftp(Port)" control
}
return 1