diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2010-03-24 14:19:50 -0400 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2010-03-24 14:19:50 -0400 |
commit | 481c61d06082195d7ce8ab6cc21ce274e54b2aa4 (patch) | |
tree | 266e634cfe741240b8cd3f06402a1cee074f1e1a /lib | |
parent | ff438c994ebbbb63eda83ca34e2bbe8e3f6dfbf3 (diff) | |
parent | 05632d5db9b67264826c53d99eaa81943e36275c (diff) |
Merge branch 'master' of github.com:bagder/curl
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hostip.c | 2 | ||||
-rw-r--r-- | lib/transfer.c | 27 |
2 files changed, 15 insertions, 14 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 04a29a754..e34fd5a99 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -624,9 +624,9 @@ int Curl_resolv_timeout(struct connectdata *conn, */ rc = Curl_resolv(conn, hostname, port, entry); +#ifdef USE_ALARM_TIMEOUT clean_up: -#ifdef USE_ALARM_TIMEOUT if (timeout > 0) { #ifdef HAVE_SIGACTION diff --git a/lib/transfer.c b/lib/transfer.c index 6e669abc5..ad9499c99 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1060,21 +1060,22 @@ CURLcode Curl_readwrite(struct connectdata *conn, if(result) return result; - if(data->set.timeout && - (Curl_tvdiff(k->now, k->start) >= data->set.timeout)) { - if(k->size != -1) { - failf(data, "Operation timed out after %ld milliseconds with %" - FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received", - Curl_tvdiff(k->now, k->start), k->bytecount, k->size); - } else { - failf(data, "Operation timed out after %ld milliseconds with %" - FORMAT_OFF_T " bytes received", - Curl_tvdiff(k->now, k->start), k->bytecount); + if(k->keepon) { + if(data->set.timeout && + (Curl_tvdiff(k->now, k->start) >= data->set.timeout)) { + if(k->size != -1) { + failf(data, "Operation timed out after %ld milliseconds with %" + FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received", + Curl_tvdiff(k->now, k->start), k->bytecount, k->size); + } else { + failf(data, "Operation timed out after %ld milliseconds with %" + FORMAT_OFF_T " bytes received", + Curl_tvdiff(k->now, k->start), k->bytecount); + } + return CURLE_OPERATION_TIMEDOUT; } - return CURLE_OPERATION_TIMEDOUT; } - - if(!k->keepon) { + else { /* * The transfer has been performed. Just make some general checks before * returning. |