diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
commit | 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch) | |
tree | fbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /extra/serf | |
parent | d53c44f055929b18d7d1b25f8367ee5836c435fc (diff) |
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'extra/serf')
-rw-r--r-- | extra/serf/PKGBUILD | 17 | ||||
-rw-r--r-- | extra/serf/serf-ssl-allocator-v2.patch | 57 |
2 files changed, 62 insertions, 12 deletions
diff --git a/extra/serf/PKGBUILD b/extra/serf/PKGBUILD index 46f93edf4..fff40fb74 100644 --- a/extra/serf/PKGBUILD +++ b/extra/serf/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 198428 2013-10-30 14:48:58Z allan $ +# $Id: PKGBUILD 200589 2013-11-29 15:17:26Z angvp $ # Maintainer: Angel Velasquez <angvp@archlinux.org> # Contributor: Stéphane Gaudreault <stephane@archlinux.org> pkgname=serf -pkgver=1.3.1 -pkgrel=2 +pkgver=1.3.2 +pkgrel=1 pkgdesc="High-performance asynchronous HTTP client library" arch=('i686' 'x86_64') url="http://code.google.com/p/serf/" @@ -12,15 +12,8 @@ license=('Apache') depends=('apr-util') makedepends=('scons') options=('!staticlibs') -source=(http://serf.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2 'serf-ssl-allocator-v2.patch') -md5sums=('da5aca0cad19fd9c19129c3f8f7393dd' - 'a0ff486ee26f86cb2825decfd1dc8355') - -prepare() { - mv serf-ssl-allocator-v2.patch ${pkgname}-${pkgver} - cd ${pkgname}-${pkgver} - patch -Np0 -i serf-ssl-allocator-v2.patch -} +source=(http://serf.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2) +md5sums=('43ce30fccf39ab0186a7590e2733e3ec') build() { cd ${pkgname}-${pkgver} diff --git a/extra/serf/serf-ssl-allocator-v2.patch b/extra/serf/serf-ssl-allocator-v2.patch new file mode 100644 index 000000000..09ad42477 --- /dev/null +++ b/extra/serf/serf-ssl-allocator-v2.patch @@ -0,0 +1,57 @@ +Index: buckets/ssl_buckets.c +=================================================================== +--- buckets/ssl_buckets.c (revision 2130) ++++ buckets/ssl_buckets.c (working copy) +@@ -1192,21 +1192,16 @@ + context->server_cert_userdata = data; + } + +-static serf_ssl_context_t *ssl_init_context(void) ++static serf_ssl_context_t *ssl_init_context(serf_bucket_alloc_t *allocator) + { + serf_ssl_context_t *ssl_ctx; +- apr_pool_t *pool; +- serf_bucket_alloc_t *allocator; + + init_ssl_libraries(); + +- apr_pool_create(&pool, NULL); +- allocator = serf_bucket_allocator_create(pool, NULL, NULL); +- + ssl_ctx = serf_bucket_mem_alloc(allocator, sizeof(*ssl_ctx)); + + ssl_ctx->refcount = 0; +- ssl_ctx->pool = pool; ++ ssl_ctx->pool = serf_bucket_allocator_get_pool(allocator); + ssl_ctx->allocator = allocator; + + ssl_ctx->ctx = SSL_CTX_new(SSLv23_client_method()); +@@ -1263,8 +1258,6 @@ + static apr_status_t ssl_free_context( + serf_ssl_context_t *ssl_ctx) + { +- apr_pool_t *p; +- + /* If never had the pending buckets, don't try to free them. */ + if (ssl_ctx->decrypt.pending != NULL) { + serf_bucket_destroy(ssl_ctx->decrypt.pending); +@@ -1277,10 +1270,7 @@ + SSL_free(ssl_ctx->ssl); + SSL_CTX_free(ssl_ctx->ctx); + +- p = ssl_ctx->pool; +- + serf_bucket_mem_free(ssl_ctx->allocator, ssl_ctx); +- apr_pool_destroy(p); + + return APR_SUCCESS; + } +@@ -1294,7 +1284,7 @@ + + ctx = serf_bucket_mem_alloc(allocator, sizeof(*ctx)); + if (!ssl_ctx) { +- ctx->ssl_ctx = ssl_init_context(); ++ ctx->ssl_ctx = ssl_init_context(allocator); + } + else { + ctx->ssl_ctx = ssl_ctx; |