[pacman-dev] [PATCH] Add configuration options for libcurl's "low speed" timeout
ahills at ednos.net
Wed Mar 26 15:27:34 EDT 2014
On 3/26/14, 2:07 PM, Dave Reisner wrote:
> What do you plan to set these values to in your environment? Why
> shouldn't we just adjust these to be more lax?
I set the low speed limit to zero and disable the check completely,
because of the ridiculous firewall. I don't really understand the reason
libcurl even has these options, but obviously someone thought it was a
good reason to keep this functionality in pacman, so I opted to add the
configuration options to pacman.conf instead. Possibly someone has
intermittent problems with certain mirrors and this allows them to fall
back to the next mirror. I have the privilege of an excellent connection
and have never observed such an issue. The patch for simply disabling it
is much simpler; simply change lib/libalpm/dload.c:297's "1L" to "0L",
and erase the line following.
>> +/** Returns the libcurl low speed limit. */
>> +long alpm_option_get_lowspeedlimit(alpm_handle_t *handle);
>> +/** Sets the libcurl low speed limit. */
>> +int alpm_option_set_lowspeedlimit(alpm_handle_t *handle, long
> What is this measured in ? bytes? megabytes? mebibytes?
>> +/** Returns the libcurl low speed time. */
>> +long alpm_option_get_lowspeedtime(alpm_handle_t *handle);
>> +/** Sets the libcurl low speed time. */
>> +int alpm_option_set_lowspeedtime(alpm_handle_t *handle, long lowspeedtime);
> seconds? milliseconds? hours?
Bytes per second and seconds. These were noted in the pacman.conf
documentation, but I forgot to add them here. I'll update it and submit
a revised patch for your consideration.
>> @@ -690,6 +711,9 @@ static int setup_libalpm(void)
>> alpm_option_set_questioncb(handle, cb_question);
>> alpm_option_set_progresscb(handle, cb_progress);
>> + handle->lowspeedlimit = config->lowspeedlimit;
>> + handle->lowspeedtime = config->lowspeedtime;
> Not sure how this compiles -- the internals of the handle aren't visible
> from the frontend code. You need to use the setter methods you added.
It was by adding the #include <handle.h>, but I will adjust it as
Thanks for the comments,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 947 bytes
Desc: OpenPGP digital signature
More information about the pacman-dev