X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_curl.c;h=f6641dcad9811ce42239b8aaa6fddaa645f4fe84;hp=569a4143ea371084e7b18d6f50586c00f769648a;hb=729594cae203b09419d195ec0dabde0430c9f1cd;hpb=6cc24086f57aa1e8f4d6a2c12361635e7c24f60f diff --git a/php_http_curl.c b/php_http_curl.c index 569a414..f6641dc 100644 --- a/php_http_curl.c +++ b/php_http_curl.c @@ -90,6 +90,12 @@ static struct gcry_thread_cbs php_http_gnutls_tsl = { PHP_MINIT_FUNCTION(http_curl) { + php_http_client_factory_driver_t driver = { + php_http_curl_client_get_ops(), + php_http_curl_client_pool_get_ops(), + php_http_curl_client_datashare_get_ops() + }; + #ifdef PHP_HTTP_NEED_OPENSSL_TSL /* mod_ssl, libpq or ext/curl might already have set thread lock callbacks */ if (!CRYPTO_get_id_callback()) { @@ -113,6 +119,10 @@ PHP_MINIT_FUNCTION(http_curl) return FAILURE; } + if (SUCCESS != php_http_client_factory_add_driver(ZEND_STRL("curl"), &driver)) { + return FAILURE; + } + return SUCCESS; }