- Made the pingpong timeout code properly deal with the response timeout AND

the global timeout if set. Also, as was reported in the bug report #2956437
  by Ryan Chan, the time stamp to use as basis for the per command timeout was
  not set properly in the DONE phase for FTP (and not for SMTP) so I fixed
  that just now. This was a regression compared to 7.19.7 due to the
  conversion of FTP code over to the generic pingpong concepts.

  http://curl.haxx.se/bug/view.cgi?id=2956437
This commit is contained in:
Daniel Stenberg
2010-03-02 13:26:23 +00:00
parent 8719398d05
commit 13ac29382f
5 changed files with 38 additions and 16 deletions

View File

@@ -637,7 +637,7 @@ static CURLcode smtp_init(struct connectdata *conn)
* a part of the easy interface, it will always be TRUE.
*/
static CURLcode smtp_connect(struct connectdata *conn,
bool *done) /* see description above */
bool *done) /* see description above */
{
CURLcode result;
struct smtp_conn *smtpc = &conn->proto.smtpc;
@@ -784,6 +784,10 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
if(status == CURLE_OK) {
struct smtp_conn *smtpc = &conn->proto.smtpc;
struct pingpong *pp= &smtpc->pp;
pp->response = Curl_tvnow(); /* timeout relative now */
state(conn, SMTP_POSTDATA);
/* run the state-machine