diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2012-06-17 11:36:26 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2012-06-17 11:36:26 +0000 |
commit | e1862a3f956d0346084a3d4b0d3acc5101a95f93 (patch) | |
tree | 89c6b602099eae2857db82d015b2125f5dcc6c4b /src/htsftp.c | |
parent | aa7da0ff5ff7dff429f62bacade2d4a6bb14b6b4 (diff) |
Fixed anonymous FTP without password (Luiz)
Diffstat (limited to 'src/htsftp.c')
-rw-r--r-- | src/htsftp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/htsftp.c b/src/htsftp.c index d07d6f1..487cbea 100644 --- a/src/htsftp.c +++ b/src/htsftp.c @@ -329,11 +329,13 @@ int run_launch_ftp(FTPDownloadStruct *pStruct) { _CHECK_HALT_FTP; if ((line[0]=='3') || (line[0]=='2')) { // --PASS-- - strcpybuff(back->info,"login: pass"); - sprintf(line,"PASS %s",pass); - send_line(soc_ctl,line); - get_ftp_line(soc_ctl,line,timeout); - _CHECK_HALT_FTP; + if (line[0] == '3') { + strcpybuff(back->info,"login: pass"); + sprintf(line,"PASS %s",pass); + send_line(soc_ctl,line); + get_ftp_line(soc_ctl,line,timeout); + _CHECK_HALT_FTP; + } if (line[0]=='2') { // ok send_line(soc_ctl,"TYPE I"); get_ftp_line(soc_ctl,line,timeout); |