Clarification questions:

Add environment variable DARCS_CONNECTION_TIMEOUT
-------------------------------------------------
> -             29 -> return $ Just OperationTimeout
> +             28 -> return $ Just OperationTimeout

Is this independent of your timeout patch?

Also, why is this curl only?  Perhaps you've explained this to me
already, in which case, sorry!  That said, it may actually be quite
acceptable for this to be a feature that's only supported with curl
as that's what most users are likely using Darcs with.

Also, if you're going to introduce a new environment variable, you
should ensure that it gets documented in the appropriate sections.  I
think darcs help environment is the correct place for now, but I forget
what we're supposed to do with the manual.  It'd be worth saying what
the default timeout is (perhaps using some way of avoiding duplication
of the magic number)

> +  error = set_time_out(easy);
> +  if (error != CURLE_OK){
> +    return curl_easy_strerror(error);
> +  }

> -      int error = curl_easy_getinfo(easy, CURLINFO_PRIVATE, (char 
> **)&url_data);
> +
> +      int error = set_time_out(easy);
> +      if (error != CURLE_OK){
> +        *errorCode = error;
> +        return curl_easy_strerror(error);
> +      }
> +
> +      error = curl_easy_getinfo(easy, CURLINFO_PRIVATE, (char **)&url_data);

These seem fine

> +int set_time_out(CURL *handle)
> +{
> +  int error;
> +  long time_out;
> +  const char *stime_out;
> +
> +  stime_out = getenv("DARCS_CONNECTION_TIMEOUT");
> +  if (stime_out != NULL)
> +    time_out = atol (stime_out);

What happens to darcs if DARCS_CONNECTION_TIMEOUT is not a number?
Like "DARCS_CONNECTION_TIMEOUT=20 "

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to