diff options
author | Steve Holme <steve_holme@hotmail.com> | 2012-12-29 23:06:25 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2012-12-29 23:06:25 +0000 |
commit | 36837c10b275829d70a5e3d6d1f3dd8b9a68f43d (patch) | |
tree | f516b40399d83d49e971a32b56700cf0cb3d0018 | |
parent | f947de4bb5c2d41ffd35f047c1f878820639c26a (diff) | |
download | curl-36837c10b275829d70a5e3d6d1f3dd8b9a68f43d.tar.gz |
smtp_doing: don't call smtp_dophase_done() if already failed
Applied the POP3 fix from commit 2897ce7dc2e1 so smtp_dophase_done()
isn't called if smtp_multi_statemach() fails.
-rw-r--r-- | lib/smtp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/smtp.c b/lib/smtp.c index b8ab8976c..7295e3efa 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1591,11 +1591,13 @@ static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done) if(result) DEBUGF(infof(conn->data, "DO phase failed\n")); - else - DEBUGF(infof(conn->data, "DO phase is complete\n")); + else { + if(*dophase_done) { + result = smtp_dophase_done(conn, FALSE /* not connected */); - if(*dophase_done) - smtp_dophase_done(conn, FALSE /* not connected */); + DEBUGF(infof(conn->data, "DO phase is complete\n")); + } + } return result; } |