X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_pool_api.c;h=cca4fbaf0241b5d2a661b99711b6ba0c41f322d6;hp=76bd181f0764a023b2b9b99a19c5dfbcbdcd2397;hb=dd579c42c06ebfe26ea2ff8ee6106a22d27e3340;hpb=a896cda2c56ae9525e8d99622841350a1fb73926 diff --git a/http_request_pool_api.c b/http_request_pool_api.c index 76bd181..cca4fba 100644 --- a/http_request_pool_api.c +++ b/http_request_pool_api.c @@ -55,14 +55,12 @@ PHP_HTTP_API http_request_pool *_http_request_pool_init(http_request_pool *pool pool->ch = NULL; } + HTTP_CHECK_CURL_INIT(pool->ch, curl_multi_init(), ;); if (!pool->ch) { - if (!(pool->ch = curl_multi_init())) { - http_error(HE_WARNING, HTTP_E_REQUEST, "Could not initialize curl"); - if (free_pool) { - efree(pool); - } - return NULL; + if (free_pool) { + efree(pool); } + return NULL; } pool->unfinished = 0;