[Pkg-haskell-commits] darcs: darcs: Backport upstream libcurl fix for x86-64 (Closes: #600759).

Trent W. Buck trentbuck at gmail.com
Fri Nov 12 03:04:47 UTC 2010


Tue Nov  9 10:09:22 UTC 2010  Trent W. Buck <trentbuck at gmail.com>
  * Backport upstream libcurl fix for x86-64 (Closes: #600759).
  Ignore-this: 99b5246d14b5b3201cb8106b8418a5a3

    M ./changelog -2 +6
    A ./patches/600759-fix-curl_multi_perform
    M ./patches/series +1

Tue Nov  9 10:09:22 UTC 2010  Trent W. Buck <trentbuck at gmail.com>
  * Backport upstream libcurl fix for x86-64 (Closes: #600759).
  Ignore-this: 99b5246d14b5b3201cb8106b8418a5a3
diff -rN -u -purd old-darcs/changelog new-darcs/changelog
--- old-darcs/changelog	2010-11-12 03:04:45.610389065 +0000
+++ new-darcs/changelog	2010-11-12 03:04:45.678392675 +0000
@@ -1,8 +1,12 @@
-darcs (2.4.4-2.2) UNRELEASED; urgency=low
+darcs (2.4.4-3) UNRELEASED; urgency=low
 
+  [ Joachim Breitner ]
   * Undo some cruft I addeded by accident to the source
 
- -- Joachim Breitner <nomeata at debian.org>  Thu, 16 Sep 2010 10:12:53 +0200
+  [ Trent W. Buck ]
+  * Backport upstream libcurl fix for x86-64 (Closes: #600759).
+
+ -- Trent W. Buck <trentbuck at gmail.com>  Tue, 09 Nov 2010 21:08:51 +1100
 
 darcs (2.4.4-2.1) unstable; urgency=low
 
diff -rN -u -purd old-darcs/patches/600759-fix-curl_multi_perform new-darcs/patches/600759-fix-curl_multi_perform
--- old-darcs/patches/600759-fix-curl_multi_perform	1970-01-01 00:00:00.000000000 +0000
+++ new-darcs/patches/600759-fix-curl_multi_perform	2010-11-12 03:04:45.614389277 +0000
@@ -0,0 +1,39 @@
+Fri Apr 16 08:47:39 EST 2010  Dmitry Kurochkin <dmitry.kurochkin at gmail.com>
+  * Fix hscurl.c when URL is downloaded during the first call to curl_multi_perform.
+  Turns out that the first call to curl_multi_perform() can fetch the URL or
+  result in error. I can easily reproduce this using HTTP server on localhost.
+  This means that situation when running_handles is zero is valid, so remove the
+  error and handle it correctly.
+Index: darcs/src/hscurl.c
+===================================================================
+--- darcs.orig/src/hscurl.c	2010-05-23 18:58:07.000000000 +1000
++++ darcs/src/hscurl.c	2010-11-09 20:00:47.012893809 +1100
+@@ -16,7 +16,6 @@
+     RESULT_MULTI_INIT_FAIL,
+     RESULT_EASY_INIT_FAIL,
+     RESULT_SLIST_APPEND_FAIL,
+-    RESULT_NO_RUNNING_HANDLES,
+     RESULT_MULTI_INFO_READ_FAIL,
+     RESULT_UNKNOWN_MESSAGE,
+     RESULT_FILE_OPEN_FAIL
+@@ -30,7 +29,6 @@
+     "curl_multi_init() failed",
+     "curl_easy_init() failed",
+     "curl_slist_append() failed",
+-    "curl_multi_perform() - no running handles",
+     "curl_multi_info_read() failed",
+     "curl_multi_info_read() returned unknown message",
+     "fopen() failed"
+@@ -64,11 +62,9 @@
+   error = curl_multi_perform(multi, &running_handles);
+   if (error != CURLM_OK && error != CURLM_CALL_MULTI_PERFORM)
+     return curl_multi_strerror(error);
+-  if (running_handles == 0)
+-    return error_strings[RESULT_NO_RUNNING_HANDLES];
+ 
+   running_handles_last = running_handles;
+-  while (1)
++  while (running_handles_last > 0)
+     {
+       while (error == CURLM_CALL_MULTI_PERFORM)
+         error = curl_multi_perform(multi, &running_handles);
diff -rN -u -purd old-darcs/patches/series new-darcs/patches/series
--- old-darcs/patches/series	2010-11-12 03:04:45.606388852 +0000
+++ new-darcs/patches/series	2010-11-12 03:04:45.614389277 +0000
@@ -3,3 +3,4 @@ no-libHSdarcs
 no-hspwd
 use-sensible-editor
 skip-external.sh-test
+600759-fix-curl_multi_perform





More information about the Pkg-haskell-commits mailing list