Add curl timeout options to the SubmitUsingHTTP method. They were only in the SubmitUsingFTP method.

This commit is contained in:
David Cole 2009-09-01 17:23:50 -04:00
parent 8710cc6422
commit d741a6a57f
1 changed files with 7 additions and 2 deletions

View File

@ -125,10 +125,11 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix,
// enable uploading // enable uploading
::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
// if there is little to no activity for 30 seconds stop submitting
// if there is little to no activity for too long stop submitting
::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1) ; ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1) ;
::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30) ; ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30) ;
::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
cmStdString local_file = *file; cmStdString local_file = *file;
@ -314,6 +315,10 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
/* enable uploading */ /* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
// if there is little to no activity for too long stop submitting
::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1) ;
::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 30) ;
/* HTTP PUT please */ /* HTTP PUT please */
::curl_easy_setopt(curl, CURLOPT_PUT, 1); ::curl_easy_setopt(curl, CURLOPT_PUT, 1);
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);