summaryrefslogtreecommitdiff
path: root/core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-02 03:29:07 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-02 03:29:07 +0000
commit171120794a952c6e0e75aef6ecdf46cd6d5154c8 (patch)
tree963098bd54ea43d811307fd081a8d08380723e30 /core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
parent2d8813df5b3f8a63835a228496f998914755d820 (diff)
Sun Feb 2 03:26:29 UTC 2014
Diffstat (limited to 'core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch')
-rw-r--r--core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch b/core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
deleted file mode 100644
index 97858e3f5..000000000
--- a/core/curl/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2715d7f948c8eb7cd3cba38f3dff6d4148e7cfaf Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Sun, 22 Dec 2013 23:36:11 +0100
-Subject: [PATCH] FILE: don't wait due to CURLOPT_MAX_RECV_SPEED_LARGE
-
-The FILE:// code doesn't support this option - and it doesn't make sense
-to support it as long as it works as it does since then it'd only block
-even longer.
-
-But: setting CURLOPT_MAX_RECV_SPEED_LARGE would make the transfer first
-get done and then libcurl would wait until the average speed would get
-low enough. This happened because the transfer happens completely in the
-DO state for FILE:// but then it would still unconditionally continue in
-to the PERFORM state where the speed check is made.
-
-Starting now, the code will skip from DO_DONE to DONE immediately if no
-socket is set to be recv()ed or send()ed to.
-
-Bug: http://curl.haxx.se/bug/view.cgi?id=1312
-Reported-by: Mohammad AlSaleh
----
- lib/multi.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/lib/multi.c b/lib/multi.c
-index ec45ecb..191c9b8 100644
---- a/lib/multi.c
-+++ b/lib/multi.c
-@@ -1381,7 +1381,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
- Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);
- /* Check if we can move pending requests to send pipe */
- Curl_multi_process_pending_handles(multi);
-- multistate(data, CURLM_STATE_WAITPERFORM);
-+
-+ /* Only perform the transfer if there's a good socket to work with.
-+ Having both BAD is a signal to skip immediately to DONE */
-+ if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
-+ (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
-+ multistate(data, CURLM_STATE_WAITPERFORM);
-+ else
-+ multistate(data, CURLM_STATE_DONE);
- result = CURLM_CALL_MULTI_PERFORM;
- break;
-
---
-1.8.5.2
-