Tcl Library Source Code

View Ticket
Login
Ticket UUID: 744276
Title: ftp::Get of a nonexistent file
Type: Bug Version: None
Submitter: rohanpall Created on: 2003-05-27 14:00:20
Subsystem: ftp Assigned To: gwlester
Priority: 5 Medium Severity:
Status: Open Last Modified: 2004-03-04 05:23:31
Resolution: None Closed By:
    Closed on:
Description:
I'm using ftp 2.4, and mandrake linux 9.1

This occurs when ftp::VERBOSE and ftp::DEBUG are both 0.

Open a connection in passive mode, try to get a
nonexistent file, and it will hang with tclkit
200303.001, tkcon, and tclsh 8.3.3

When ftp::VERBOSE and ftp::DEBUG are turned on, no
problems occur.

% package require ftp 2.4
2.4
% ftp::Open $server $name $pass -mode passive
0
% ftp::Get 0 nonexistent_file
can't unset "ftp(state.data)": no such element in array
    while executing
"unset ftp(state.data)"
    ("default" arm line 4)
    invoked from within
"switch -exact -- $rc {
                1 {
                    set ftp(State) get_close
                }
                default {
                  ..."
    ("get_sent" arm line 2)
    invoked from within
"switch -exact -- $ftp(State) {
        user {
            switch -exact -- $rc {
                2 {
                    PutsCtrlSock $s "USER $ftp(U..."
    (procedure "::ftp::StateHandler" line 71)
    invoked from within
"::ftp::StateHandler 0 sock4"
error     error | E: Timeout of control connection
after 600 sec.!
debug      | 0 bytes sent in 600 seconds (0 Bytes/s)
1
%
User Comments: andreas_kupries added on 2003-10-22 04:16:36:
Logged In: YES 
user_id=75003

Is adding a [catch] around the failing unset statement 
sufficient to make the problem go away ?

(The ftp code we have inherited here is very convoluted and I 
am trying to get away with a change as minimal as possible).