[pacman-dev] [PATCH] Add robustness to dload against throtling firewall

LANGLOIS Olivier PIS -EXT olivier.pis.langlois at transport.alstom.com
Mon Jan 28 19:43:09 EST 2013


Implemented as discussed in this thread:
https://mailman.archlinux.org/pipermail/pacman-dev/2013-January/016273.html
I have been running this diff without any regression and it does fix my firewall throttling issue

Signed-off-by: Olivier Langlois < olivier.pis.langlois at transport.alstom.com>
---
 lib/libalpm/dload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 83d2051..19f629d 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -294,7 +294,7 @@ static void curl_set_handle_opts(struct dload_payload *payload,
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
        curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, dload_progress_cb);
        curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void *)payload);
-       curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1024L);
+       curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1L);
        curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);
        curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, dload_parseheader_cb);
        curl_easy_setopt(curl, CURLOPT_WRITEHEADER, (void *)payload);
--
1.8.1.1


________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.


More information about the pacman-dev mailing list