[pacman-dev] [PATCH] Add configuration options for libcurl's "low speed" timeout

Andrew Hills ahills at ednos.net
Wed Mar 26 12:15:09 EDT 2014

Thanks for the quick response.

On 3/25/14, 9:19 PM, Allan McRae wrote:
> Did this even compile?  The include should fail given libalpm is not in
> the pacman source inlcude path.

It does indeed compile, I'm using it! :) The header I include (handle.h)
is in the same directory as the header included immediately above it
(alpm.h). I built it with makepkg; are there other environments in which
you expect this to fail? It seems to me that libalpm is always
distributed with pacman.

> Anyway, as with all the other options you will need to add a
> alpm_option_set/get_...() function.  This gives all frontends access.

> No documentation updates to be seen.  pacman.conf man page and example
> pacman.conf will need changed.

> Indenting is always tabs in pacman.  This varies throughout your patch...

I will send a patch shortly addressing these mistakes. Does libalpm have
tests that I should also be updating?

> How does curl handle negative values for the limits?  Perhaps we should
> ensure this is positive too.

It's a simple less-than comparison; see curl's lib/speedcheck.c:39-57
for details. Setting a negative low speed time will always trigger the
low speed failure, e.g.:

Operation too slow. Less than 1 bytes/sec transferred the last -30 seconds

Setting a negative (or zero) low speed limit will effectively disable
the check, regardless of the low speed time. It may be more elegant to
provide an option to disable the check, but I usually err on the side of


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 947 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20140326/4e4da31d/attachment-0001.asc>

More information about the pacman-dev mailing list