From 48981407809f0404e0427637f8474c9ccc2eafa4 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 15 Jun 2005 11:55:13 +0000 Subject: [PATCH 1/1] - multiple send seems to work now without bigger problems --- http_request_pool_api.c | 9 +-------- php_http_request_pool_api.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/http_request_pool_api.c b/http_request_pool_api.c index 4375303..a9cd4ed 100644 --- a/http_request_pool_api.c +++ b/http_request_pool_api.c @@ -59,7 +59,6 @@ PHP_HTTP_API http_request_pool *_http_request_pool_init(http_request_pool *pool } } - pool->sent = 0; pool->unfinished = 0; zend_llist_init(&pool->handles, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); zend_llist_init(&pool->bodies, sizeof(http_request_body *), (llist_dtor_func_t) http_request_pool_freebody, 0); @@ -160,14 +159,8 @@ PHP_HTTP_API void _http_request_pool_detach_all(http_request_pool *pool TSRMLS_D PHP_HTTP_API STATUS _http_request_pool_send(http_request_pool *pool TSRMLS_DC) { #if HTTP_DEBUG_REQPOOLS - fprintf(stderr, "Attempt to send requests of pool %p\n", pool); + fprintf(stderr, "Attempt to send %d requests of pool %p\n", zend_llist_count(&pool->handles), pool); #endif - if (pool->sent) { - http_error(E_WARNING, HTTP_E_CURL, "HttpRequestPools can only be used once"); - return FAILURE; - } else { - pool->sent = 1; - } while (http_request_pool_perform(pool)) { #if HTTP_DEBUG_REQPOOLS fprintf(stderr, "%d unfinished requests of pool %p remaining\n", pool->unfinished, pool); diff --git a/php_http_request_pool_api.h b/php_http_request_pool_api.h index 115cd3d..3243de9 100644 --- a/php_http_request_pool_api.h +++ b/php_http_request_pool_api.h @@ -29,7 +29,6 @@ typedef struct { CURLM *ch; - zend_bool sent; zend_llist handles; zend_llist bodies; int unfinished; -- 2.30.2