diff options
author | H. Peter Anvin <hpa@zytor.com> | 2011-05-03 23:54:58 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-05-03 23:54:58 -0700 |
commit | b61066d7577ddbe1283a973df668bb124d3ddb23 (patch) | |
tree | 7e6202b30eac0eccc6a2a9a05fdf309b0a72e2c1 | |
parent | 4c9b4b40238d6afda386d1d5fb088cbc9aa68c42 (diff) | |
download | syslinux-b61066d7577ddbe1283a973df668bb124d3ddb23.tar.gz |
pxe, ftp: correct the handling of continuation lines
Correct the handling of FTP messages with continuation lines.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | core/fs/pxe/ftp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/core/fs/pxe/ftp.c b/core/fs/pxe/ftp.c index 10a9f5c4..097536d1 100644 --- a/core/fs/pxe/ftp.c +++ b/core/fs/pxe/ftp.c @@ -80,19 +80,16 @@ static int ftp_cmd_response(struct inode *inode, const char *cmd, done = false; while ((c = pxe_getc(inode)) >= 0) { - //printf("%c", c); - if (c == '\n') { - pos = 0; if (done) { if (pn) { pn += ps; if (pn_ptr) *pn_ptr = pn; } - //printf("FTP response: %u\n", code); return code; } + pos = code = 0; first_line = false; continue; } @@ -248,9 +245,6 @@ void ftp_open(struct url_info *url, int flags, struct inode *inode, } resp = ftp_cmd_response(socket->ctl, "PASV", NULL, pasv_data, &pasv_bytes); - //printf("%u PASV %u bytes %u,%u,%u,%u,%u,%u\n", - //resp, pasv_bytes, pasv_data[0], pasv_data[1], pasv_data[2], - //pasv_data[3], pasv_data[4], pasv_data[5]); if (resp != 227 || pasv_bytes != 6) goto err_disconnect; |