[arch-commits] Commit in curl/trunk (2 files)

Dave Reisner dreisner at nymeria.archlinux.org
Fri Aug 30 02:00:57 UTC 2013


    Date: Friday, August 30, 2013 @ 04:00:56
  Author: dreisner
Revision: 193740

upgpkg: curl 7.32.0-2

- backport fix to make curl_multi_remove_handle idempotent

Added:
  curl/trunk/0001-curl_multi_remove_handle-allow-multiple-removes.patch
Modified:
  curl/trunk/PKGBUILD

------------------------------------------------------------+
 0001-curl_multi_remove_handle-allow-multiple-removes.patch |   29 +++++++++++
 PKGBUILD                                                   |   10 +++
 2 files changed, 38 insertions(+), 1 deletion(-)

Added: 0001-curl_multi_remove_handle-allow-multiple-removes.patch
===================================================================
--- 0001-curl_multi_remove_handle-allow-multiple-removes.patch	                        (rev 0)
+++ 0001-curl_multi_remove_handle-allow-multiple-removes.patch	2013-08-30 02:00:56 UTC (rev 193740)
@@ -0,0 +1,29 @@
+From 84f3b3dd448399f9548468676e1bd1475dba8de5 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Thu, 29 Aug 2013 22:08:01 +0200
+Subject: [PATCH] curl_multi_remove_handle: allow multiple removes
+
+When removing an already removed handle, avoid that to ruin the
+internals and just return OK instead.
+---
+ lib/multi.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index fb495e0..e723a3e 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -483,6 +483,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
+   if(!GOOD_EASY_HANDLE(curl_handle))
+     return CURLM_BAD_EASY_HANDLE;
+ 
++  /* Prevent users from trying to remove same easy handle more than once */
++  if(!data->multi)
++    return CURLM_OK; /* it is already removed so let's say it is fine! */
++
+   if(easy) {
+     bool premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE;
+     bool easy_owns_conn = (data->easy_conn &&
+-- 
+1.8.4
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-08-29 23:46:03 UTC (rev 193739)
+++ PKGBUILD	2013-08-30 02:00:56 UTC (rev 193740)
@@ -7,7 +7,7 @@
 
 pkgname=curl
 pkgver=7.32.0
-pkgrel=1
+pkgrel=2
 pkgdesc="An URL retrieval utility and library"
 arch=('i686' 'x86_64')
 url="http://curl.haxx.se"
@@ -16,11 +16,19 @@
 provides=('libcurl.so')
 options=('!libtool')
 source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc}
+        0001-curl_multi_remove_handle-allow-multiple-removes.patch
         curlbuild.h)
 md5sums=('f77cf3cb59cf2bfe686b80338323fd40'
          'SKIP'
+         '589a2ccdf90e198fca398809e9d16128'
          '751bd433ede935c8fae727377625a8ae')
 
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  patch -Np1 <"$srcdir"/0001-curl_multi_remove_handle-allow-multiple-removes.patch 
+}
+
 build() {
   cd "$pkgname-$pkgver"
 




More information about the arch-commits mailing list