|
@ -598,7 +598,7 @@ static err_t ftpd_datarecv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t |
|
|
|
|
|
|
|
|
if (err == ERR_OK && p != NULL) { |
|
|
if (err == ERR_OK && p != NULL) { |
|
|
struct pbuf *q; |
|
|
struct pbuf *q; |
|
|
u16_t tot_len; |
|
|
u16_t tot_len = 0; |
|
|
|
|
|
|
|
|
for (q = p; q != NULL; q = q->next) { |
|
|
for (q = p; q != NULL; q = q->next) { |
|
|
int len; |
|
|
int len; |
|
@ -793,7 +793,7 @@ static void cmd_pwd(const char *arg, struct tcp_pcb *pcb, struct ftpd_msgstate * |
|
|
{ |
|
|
{ |
|
|
char *path; |
|
|
char *path; |
|
|
|
|
|
|
|
|
if (path = vfs_getcwd(fsm->vfs, NULL, 0)) { |
|
|
if ((path = vfs_getcwd(fsm->vfs, NULL, 0))) { |
|
|
send_msg(pcb, fsm, msg257PWD, path); |
|
|
send_msg(pcb, fsm, msg257PWD, path); |
|
|
free(path); |
|
|
free(path); |
|
|
} |
|
|
} |
|
@ -1118,32 +1118,32 @@ struct ftpd_command { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
static struct ftpd_command ftpd_commands[] = { |
|
|
static struct ftpd_command ftpd_commands[] = { |
|
|
"USER", cmd_user, |
|
|
{"USER", cmd_user}, |
|
|
"PASS", cmd_pass, |
|
|
{"PASS", cmd_pass}, |
|
|
"PORT", cmd_port, |
|
|
{"PORT", cmd_port}, |
|
|
"QUIT", cmd_quit, |
|
|
{"QUIT", cmd_quit}, |
|
|
"CWD", cmd_cwd, |
|
|
{"CWD", cmd_cwd}, |
|
|
"CDUP", cmd_cdup, |
|
|
{"CDUP", cmd_cdup}, |
|
|
"PWD", cmd_pwd, |
|
|
{"PWD", cmd_pwd}, |
|
|
"XPWD", cmd_pwd, |
|
|
{"XPWD", cmd_pwd}, |
|
|
"NLST", cmd_nlst, |
|
|
{"NLST", cmd_nlst}, |
|
|
"LIST", cmd_list, |
|
|
{"LIST", cmd_list}, |
|
|
"RETR", cmd_retr, |
|
|
{"RETR", cmd_retr}, |
|
|
"STOR", cmd_stor, |
|
|
{"STOR", cmd_stor}, |
|
|
"NOOP", cmd_noop, |
|
|
{"NOOP", cmd_noop}, |
|
|
"SYST", cmd_syst, |
|
|
{"SYST", cmd_syst}, |
|
|
"ABOR", cmd_abrt, |
|
|
{"ABOR", cmd_abrt}, |
|
|
"TYPE", cmd_type, |
|
|
{"TYPE", cmd_type}, |
|
|
"MODE", cmd_mode, |
|
|
{"MODE", cmd_mode}, |
|
|
"RNFR", cmd_rnfr, |
|
|
{"RNFR", cmd_rnfr}, |
|
|
"RNTO", cmd_rnto, |
|
|
{"RNTO", cmd_rnto}, |
|
|
"MKD", cmd_mkd, |
|
|
{"MKD", cmd_mkd}, |
|
|
"XMKD", cmd_mkd, |
|
|
{"XMKD", cmd_mkd}, |
|
|
"RMD", cmd_rmd, |
|
|
{"RMD", cmd_rmd}, |
|
|
"XRMD", cmd_rmd, |
|
|
{"XRMD", cmd_rmd}, |
|
|
"DELE", cmd_dele, |
|
|
{"DELE", cmd_dele}, |
|
|
//"PASV", cmd_pasv,
|
|
|
//{"PASV", cmd_pasv},
|
|
|
NULL |
|
|
{NULL, NULL} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
static void send_msgdata(struct tcp_pcb *pcb, struct ftpd_msgstate *fsm) |
|
|
static void send_msgdata(struct tcp_pcb *pcb, struct ftpd_msgstate *fsm) |
|
|