mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-29 16:14:16 +01:00
Merge pull request #32 from m45t3r/master
Print parsed command when it is invalid
This commit is contained in:
commit
4dba517776
@ -1234,7 +1234,11 @@ ftp_session_read_command(ftp_session_t *session,
|
||||
/* execute the command */
|
||||
if(command == NULL)
|
||||
{
|
||||
ftp_send_response(session, 502, "invalid command\r\n");
|
||||
/* remove CRLF from buffer, if exists */
|
||||
char *crlf_loc = strstr(buffer, "\r\n");
|
||||
if (crlf_loc)
|
||||
*crlf_loc = '\0';
|
||||
ftp_send_response(session, 502, "Invalid command \"%s\"\r\n", buffer);
|
||||
}
|
||||
else if(session->state != COMMAND_STATE)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user