cvs: pecl /http http_request_api.c

From: Date: Tue, 14 Jun 2005 10:39:22 +0000
Subject: cvs: pecl /http http_request_api.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3277@lists.php.net to get a copy of this message
mike Tue Jun 14 06:39:22 2005 EDT Modified files: /pecl/http http_request_api.c Log: - curl_multi_add_handle may return CURLM_CALL_MULTI_PERFORM (at least it does in v7.11.3 on debian) http://cvs.php.net/diff.php/pecl/http/http_request_api.c?r1=1.18&r2=1.19&ty=u Index: pecl/http/http_request_api.c diff -u pecl/http/http_request_api.c:1.18 pecl/http/http_request_api.c:1.19 --- pecl/http/http_request_api.c:1.18 Mon Jun 13 12:35:14 2005 +++ pecl/http/http_request_api.c Tue Jun 14 06:39:22 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http_request_api.c,v 1.18 2005/06/13 16:35:14 mike Exp $ */ +/* $Id: http_request_api.c,v 1.19 2005/06/14 10:39:22 mike Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -177,7 +177,7 @@ zend_llist_add_element(&HTTP_G(request).copies.contexts, &data); return data; } - + default: { return data; @@ -868,14 +868,17 @@ if (SUCCESS != http_request_object_requesthandler(req, request, body)) { http_error_ex(E_WARNING, HTTP_E_CURL, "Could not initialize HttpRequest object for attaching to the HttpRequestPool"); - } else if (CURLM_OK != (code = curl_multi_add_handle(pool->ch, req->ch))) { - http_error_ex(E_WARNING, HTTP_E_CURL, "Could not attach HttpRequest object to the HttpRequestPool: %s", curl_multi_strerror(code)); } else { - req->pool = pool; - zval_add_ref(&request); - zend_llist_add_element(&pool->handles, &request); - zend_llist_add_element(&pool->bodies, &body); - return SUCCESS; + code = curl_multi_add_handle(pool->ch, req->ch); + if ((CURLM_OK != code) && (CURLM_CALL_MULTI_PERFORM != code)) { + http_error_ex(E_WARNING, HTTP_E_CURL, "Could not attach HttpRequest object to the HttpRequestPool: %s", curl_multi_strerror(code)); + } else { + req->pool = pool; + zval_add_ref(&request); + zend_llist_add_element(&pool->handles, &request); + zend_llist_add_element(&pool->bodies, &body); + return SUCCESS; + } } efree(body); }

« previous php.pecl.cvs (#3277) next »