aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-10-27 12:46:29 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-10-27 12:46:29 +0200
commitb0d42da26bd66baf326781149bdbdd7336d51269 (patch)
tree6a57bc494a02ccebc54fed36fa3f663cc4f51b67 /lib/multi.c
parent120025b7f853562af685e6385794c518eccc28c4 (diff)
multi: start ftp state machine when switching to DO_MORE
This extends the fix from commit d7934b8bd491 When the multi state is changed within the multi_runsingle from DOING to DO_MORE, we didn't immediately start the FTP state machine again. That then left the FTP state in FTP_STOP. When curl_multi_fdset() was subsequently called, the ftp_domore_getsock() function would return the wrong fd info. Reported by: Gokhan Sengun
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 6e4ec37a8..5026f8d2d 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1339,18 +1339,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
&dophase_done);
if(CURLE_OK == easy->result) {
if(dophase_done) {
- /* after DO, go PERFORM... or DO_MORE */
- if(easy->easy_conn->bits.do_more) {
- /* we're supposed to do more, but we need to sit down, relax
- and wait a little while first */
- multistate(easy, CURLM_STATE_DO_MORE);
- result = CURLM_OK;
- }
- else {
- /* we're done with the DO, now DO_DONE */
- multistate(easy, CURLM_STATE_DO_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
- }
+ /* after DO, go DO_DONE or DO_MORE */
+ multistate(easy, easy->easy_conn->bits.do_more?
+ CURLM_STATE_DO_MORE:
+ CURLM_STATE_DO_DONE);
+ result = CURLM_CALL_MULTI_PERFORM;
} /* dophase_done */
}
else {