*** ftp.c 1997/01/18 20:17:39 1.7 --- ftp.c 1998/11/03 02:15:25 *************** *** 216,221 **** --- 216,222 ---- int ftp_setup(sockfd, rfd, ftp_listen) int sockfd, rfd, *ftp_listen; { int siteinfo = ftp_siteinfo; + int reply; ftp_siteinfo = -1; if( get_ftp_reply(rfd) != '2') *************** *** 225,244 **** say(rfd,"USER anonymous"); else say(rfd, ftp_user); ! if( get_ftp_reply(rfd) != '3') ! goto broken; ! ! if( ftp_pass[0] == '\0') ! sprintf(ftp_reply_buf,"PASS http-gw@%s", ourname); ! else ! strcpy(ftp_reply_buf, ftp_pass); ! say(rfd, ftp_reply_buf); ! ! ftp_siteinfo = siteinfo; ! ! if( get_ftp_reply(rfd) != '2') ! goto broken; ! if( ftp_repcnt > 2){ ftp_gensitedir = 1; } --- 226,249 ---- say(rfd,"USER anonymous"); else say(rfd, ftp_user); ! reply = get_ftp_reply(rfd); ! if( reply != '2') { ! if( reply != '3') ! goto broken; ! ! if( ftp_pass[0] == '\0') ! sprintf(ftp_reply_buf,"PASS http-gw@%s", ourname); ! else ! strcpy(ftp_reply_buf, ftp_pass); ! say(rfd, ftp_reply_buf); ! ! ftp_siteinfo = siteinfo; ! ! if( get_ftp_reply(rfd) != '2') ! goto broken; ! } else { ! ftp_siteinfo = siteinfo; ! } if( ftp_repcnt > 2){ ftp_gensitedir = 1; }