From f15fd5dc2c0df456a0796cd8d5369cdb4561abda Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 23 Dec 2014 10:57:02 +0100 Subject: [PATCH] xbps: fix merged patch from master (v2). --- ...x-races-in-the-cache-connection-code.patch | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/srcpkgs/xbps/patches/0001-libfetch-fix-races-in-the-cache-connection-code.patch b/srcpkgs/xbps/patches/0001-libfetch-fix-races-in-the-cache-connection-code.patch index 051667eab36..7c42c37eb84 100644 --- a/srcpkgs/xbps/patches/0001-libfetch-fix-races-in-the-cache-connection-code.patch +++ b/srcpkgs/xbps/patches/0001-libfetch-fix-races-in-the-cache-connection-code.patch @@ -68,71 +68,6 @@ index 1ea017b..edd8e89 100644 } /* -diff --git a/lib/plist_fetch.c b/lib/plist_fetch.c -index d9908ef..a153551 100644 ---- lib/plist_fetch.c -+++ lib/plist_fetch.c -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #include "xbps_api_impl.h" - -@@ -44,7 +43,6 @@ struct fetch_archive { - struct url *url; - struct fetchIO *fetch; - char buffer[32768]; -- pthread_mutex_t mtx; - }; - - static int -@@ -52,9 +50,7 @@ fetch_archive_open(struct archive *a _unused, void *client_data) - { - struct fetch_archive *f = client_data; - -- pthread_mutex_lock(&f->mtx); - f->fetch = fetchGet(f->url, NULL); -- pthread_mutex_unlock(&f->mtx); - - if (f->fetch == NULL) - return ENOENT; -@@ -66,13 +62,9 @@ static ssize_t - fetch_archive_read(struct archive *a _unused, void *client_data, const void **buf) - { - struct fetch_archive *f = client_data; -- ssize_t res; - - *buf = f->buffer; -- pthread_mutex_lock(&f->mtx); -- res = fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer)); -- pthread_mutex_unlock(&f->mtx); -- return res; -+ return fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer)); - } - - static int -@@ -80,11 +72,8 @@ fetch_archive_close(struct archive *a _unused, void *client_data) - { - struct fetch_archive *f = client_data; - -- pthread_mutex_lock(&f->mtx); - if (f->fetch != NULL) - fetchIO_close(f->fetch); -- pthread_mutex_unlock(&f->mtx); -- pthread_mutex_destroy(&f->mtx); - free(f); - - return 0; -@@ -101,7 +90,6 @@ open_archive_by_url(struct url *url) - return NULL; - - f->url = url; -- pthread_mutex_init(&f->mtx, NULL); - - if ((a = archive_read_new()) == NULL) { - free(f); -- 2.2.1