From e1862a3f956d0346084a3d4b0d3acc5101a95f93 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sun, 17 Jun 2012 11:36:26 +0000 Subject: Fixed anonymous FTP without password (Luiz) --- src/htsftp.c | 12 +++++++----- 1 file 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); -- cgit v1.2.3