aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-08-08 10:41:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-08-08 10:43:09 +0200
commitda3ae20da56676361e959d07956dddc641a4a6a7 (patch)
tree2ab9cde8ec56a1b31d398d3282f60a95ae005543 /lib/ftp.c
parent73548e1d22e7ab0c39d7a98e42adbbe2f6221725 (diff)
ftp_doing: bail out on error properly
When a failure has been detected we must abort immdiately. Bug: http://curl.haxx.se/mail/lib-2011-07/0177.html Reported by: "Spoon Man"
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index c30d809b0..689eda294 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4094,12 +4094,13 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
/* called from multi.c while DOing */
static CURLcode ftp_doing(struct connectdata *conn,
- bool *dophase_done)
+ bool *dophase_done)
{
- CURLcode result;
- result = ftp_multi_statemach(conn, dophase_done);
+ CURLcode result = ftp_multi_statemach(conn, dophase_done);
- if(*dophase_done) {
+ if(result)
+ DEBUGF(infof(conn->data, "DO phase failed\n"));
+ else if(*dophase_done) {
result = ftp_dophase_done(conn, FALSE /* not connected */);
DEBUGF(infof(conn->data, "DO phase is complete\n"));