Some more thoughts: maybe the 30 second value should be #defined in hscurl.h as DEFAULT_CONNECTION_TIMEOUT. This would be clearer and also allow you to avoid duplication in the documentation later
Add environment variable DARCS_CONNECTION_TIMEOUT
-------------------------------------------------
> +int set_time_out(CURL *handle)
> +{
> + int error;
> + long time_out = 30;
> + const char *stime_out;
> +
> + stime_out = getenv("DARCS_CONNECTION_TIMEOUT");
> + if (stime_out != NULL){
> + long result = atol (stime_out);
> + if ( result > 0 )
> + time_out = result;
> + }
Does this mean that parse errors are treated as 0? (which your code
would then just silently treat as the default 30s)? Maybe set_time_out
should return an error instead so that you can notify the user that
something went wrong.
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
