smtp_doing: don't call smtp_dophase_done() if already failed

Applied the POP3 fix from commit 2897ce7dc2 so smtp_dophase_done()
isn't called if smtp_multi_statemach() fails.
This commit is contained in:
Steve Holme 2012-12-29 23:06:25 +00:00
parent f947de4bb5
commit 36837c10b2
1 changed files with 6 additions and 4 deletions

View File

@ -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;
}