xbps: fix merged patch from master (v2).
This commit is contained in:
parent
87bc3faec1
commit
f15fd5dc2c
1 changed files with 0 additions and 65 deletions
|
@ -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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
-#include <pthread.h>
|
||||
|
||||
#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
|
||||
|
||||
|
|
Loading…
Reference in a new issue