mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
FTP: do_more: add check for wait_data_conn in upload case
In some timing-dependnt cases when a 4xx response immediately followed after a 150 when a STOR was issued, this function would wrongly return 'complete == true' while 'wait_data_conn' was still set. Closes #405 Reported-by: Patricia Muscalu
This commit is contained in:
parent
664398e43b
commit
27620171ff
@ -3723,6 +3723,12 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
result = ftp_multi_statemach(conn, &complete);
|
result = ftp_multi_statemach(conn, &complete);
|
||||||
|
if(ftpc->wait_data_conn)
|
||||||
|
/* if we reach the end of the FTP state machine here, *complete will be
|
||||||
|
TRUE but so is ftpc->wait_data_conn, which says we need to wait for
|
||||||
|
the data connection and therefore we're not actually complete */
|
||||||
|
*completep = 0;
|
||||||
|
else
|
||||||
*completep = (int)complete;
|
*completep = (int)complete;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user