From: Daniel Stenberg Date: Fri, 2 Nov 2007 23:34:00 +0000 (+0000) Subject: avoid setting up a transfer when the state machine failed previously X-Git-Tag: upstream/7.37.1~8455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ec8f77f2121f710638aa0e9903424bb608176ab;p=platform%2Fupstream%2Fcurl.git avoid setting up a transfer when the state machine failed previously --- diff --git a/lib/ftp.c b/lib/ftp.c index d138351..91a346b 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -3525,10 +3525,10 @@ static CURLcode Curl_ftp_nextconnect(struct connectdata *conn) result = ftp_easy_statemach(conn); } - if(ftp->transfer != FTPTRANSFER_BODY) + if((result == CURLE_OK) && (ftp->transfer != FTPTRANSFER_BODY)) /* no data to transfer. FIX: it feels like a kludge to have this here too! */ - result=Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); /* end of transfer */ DEBUGF(infof(data, "DO-MORE phase ends with %d\n", result));