- commonize some error messages
[m6w6/ext-http] / http_request_pool_api.c
index 76bd181f0764a023b2b9b99a19c5dfbcbdcd2397..cca4fbaf0241b5d2a661b99711b6ba0c41f322d6 100644 (file)
@@ -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;