aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-08-21 13:30:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-08-21 13:30:08 +0200
commit38ef1b3e7f69e84b56dde28baca046a067dc0efb (patch)
tree8aaeabd86b958d4b4eb606352a3506176df3e15f /lib
parent1d89fd983a1ce454aa9fe1a9b0fc452b4bfccd7b (diff)
ftp: clear the do_more bit when the server has connected
The multi state machine would otherwise go into the DO_MORE state after DO, even for the case when the FTP state machine had already performed those duties, which caused libcurl to get stuck in that state and fail miserably. This occured for for active ftp uploads. Reported-by: Patricia Muscalu
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index fade092e4..7b7e11389 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -340,6 +340,9 @@ static CURLcode AcceptServerConnect(struct connectdata *conn)
return CURLE_FTP_PORT_FAILED;
}
infof(data, "Connection accepted from server\n");
+ /* when this happens within the DO state it is important that we mark us as
+ not needing DO_MORE anymore */
+ conn->bits.do_more = FALSE;
conn->sock[SECONDARYSOCKET] = s;
(void)curlx_nonblock(s, TRUE); /* enable non-blocking */