1 |
kolmodin 10/06/28 18:53:32 |
2 |
|
3 |
Added: |
4 |
darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch |
5 |
Log: |
6 |
dev-vcs/darcs-2.4.4: make a -r1 that attempts to fix two issues |
7 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-vcs/darcs/files/darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/files/darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/darcs/files/darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: darcs-2.4.4-issue1770-curl_multi_perform-no-running-handles.patch |
16 |
=================================================================== |
17 |
Fri Apr 16 00:47:39 CEST 2010 Dmitry Kurochkin <dmitry.kurochkin@×××××.com> |
18 |
* Fix hscurl.c when URL is downloaded during the first call to curl_multi_perform. |
19 |
Turns out that the first call to curl_multi_perform() can fetch the URL or |
20 |
result in error. I can easily reproduce this using HTTP server on localhost. |
21 |
This means that situation when running_handles is zero is valid, so remove the |
22 |
error and handle it correctly. |
23 |
diff -rN -u old-darcs.net/src/hscurl.c new-darcs.net/src/hscurl.c |
24 |
--- old-darcs.net/src/hscurl.c 2010-06-28 19:35:56.382397912 +0200 |
25 |
+++ new-darcs.net/src/hscurl.c 2010-06-28 19:35:57.544398155 +0200 |
26 |
@@ -19,7 +19,6 @@ |
27 |
RESULT_MULTI_INIT_FAIL, |
28 |
RESULT_EASY_INIT_FAIL, |
29 |
RESULT_SLIST_APPEND_FAIL, |
30 |
- RESULT_NO_RUNNING_HANDLES, |
31 |
RESULT_MULTI_INFO_READ_FAIL, |
32 |
RESULT_UNKNOWN_MESSAGE, |
33 |
RESULT_FILE_OPEN_FAIL |
34 |
@@ -33,7 +32,6 @@ |
35 |
"curl_multi_init() failed", |
36 |
"curl_easy_init() failed", |
37 |
"curl_slist_append() failed", |
38 |
- "curl_multi_perform() - no running handles", |
39 |
"curl_multi_info_read() failed", |
40 |
"curl_multi_info_read() returned unknown message", |
41 |
"fopen() failed" |
42 |
@@ -67,11 +65,9 @@ |
43 |
error = curl_multi_perform(multi, &running_handles); |
44 |
if (error != CURLM_OK && error != CURLM_CALL_MULTI_PERFORM) |
45 |
return curl_multi_strerror(error); |
46 |
- if (running_handles == 0) |
47 |
- return error_strings[RESULT_NO_RUNNING_HANDLES]; |
48 |
|
49 |
running_handles_last = running_handles; |
50 |
- while (1) |
51 |
+ while (running_handles_last > 0) |
52 |
{ |
53 |
while (error == CURLM_CALL_MULTI_PERFORM) |
54 |
error = curl_multi_perform(multi, &running_handles); |