mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-20 22:43:14 +00:00
[ftp] Terminate processing after receiving an error
When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply() invoked ftp_done() to close connections, but did not return, and the rest of code in this function could try to send commands to the closed control connection. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
This commit is contained in:
parent
8f4c2b4a4c
commit
e6cd16946a
@ -221,6 +221,7 @@ static void ftp_reply ( struct ftp_request *ftp ) {
|
||||
( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
|
||||
/* Flag protocol error and close connections */
|
||||
ftp_done ( ftp, -EPROTO );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Open passive connection when we get "PASV" response */
|
||||
|
Loading…
x
Reference in New Issue
Block a user