inets ftp bug

Serge Aleynikov serge@REDACTED
Wed Aug 24 13:33:13 CEST 2005


Great!

Thank you.

Serge

Ingela Anderton wrote:
> Actually this is an already known and fixed problem in inets-4.5.2
> 
> Realeasnotes says:
> 
> [ftp, client] Calling ftp:recv/2 twice on the same connection failed
> due to that the last message on the ctrl channel was not appropriately
> taken care of. This could potentially cause a problem for any
> operation performed on the same connection where there had previously
> been an ftp:recv/2 call. Also, in some cases, when the process tries
> to close the data connection, it does not take into account that the
> data connection may actually not have been established.
> 
> This will definitely be part of the next open source release. We are
> actually working on inets-4.5.3 at the moment that will fix some more
> bugs and add some new nice features to the inets components (not only
> ftp). The aim is that this version should be the one in the next open
> source release.
> 
> 
> Serge Aleynikov wrote:
> 
>>OTP team:
>>
>>I found a bug in the inets' ftp.erl client that can be patched by 
>>applying the ftp.erl.patch file to the source.
>>
>>The bug is seen when you try to download more than one file in a row 
>>using ftp:recv/2 function.  For some reason this bug doesn't occur when 
>>tracing is enabled (and/or debugger application is running).
>>
>>Use the following to reproduce the bug:
>>
>>ftp_test:test(Host, User, Password, RemoteDir, RemoteFile).
>>
>>~/tmp/dirtest>erl -pa ~/Projects/DRP/lib/drpdb-1.0/ebin
>>Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0]
>>
>>Eshell V5.4.8  (abort with ^G)
>>1> ftp_test:test("localhost", "serge", "...", "/home/serge", "tt.txt").
>>"220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]"
>>"331 Password required for serge."
>>"230 User serge logged in."
>>"250 CWD command successful."
>>"500 EPSV not understood."
>>"200 PORT command successful"
>>"150 Opening ASCII mode data connection for tt.txt (7487 bytes)"
>>"226 Transfer complete."
>>"200 PORT command successful"
>>** exited: {{function_clause,[{inet,tcp_close,[{lsock,#Port<0.123>}]},
>>                               {ftp,do_termiante,2},
>>                               {gen_server,terminate,6},
>>                               {proc_lib,init_p,5}]},
>>             {gen_server,call,
>>                         [<0.42.0>,
>>                          {recv,"tt.txt","tt.txt"},
>>                          infinity]}} **
>>
>>Hope that it can make it in the next OTP release.
>>
>>Regards,
>>
>>Serge
>>



More information about the erlang-questions mailing list