]> granicus.if.org Git - php/commitdiff
- MFH: [DOC] #47739. add option CURLOPT_IPRESOLVE which accepts CURL_IPRESOLVE_WHATEV...
authorPierre Joye <pajoye@php.net>
Mon, 4 May 2009 12:12:57 +0000 (12:12 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 4 May 2009 12:12:57 +0000 (12:12 +0000)
ext/curl/interface.c

index 5b4112030e64df250297bc9faeafa00f16ef2efa..97b5586812ef325f70685c400c593443de40f7c2 100644 (file)
@@ -444,6 +444,10 @@ PHP_MINIT_FUNCTION(curl)
        le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl", module_number);
 
        /* Constants for curl_setopt() */
+       REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE);
+       REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER);
+       REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4);
+       REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6);
        REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
        REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
        REGISTER_CURL_CONSTANT(CURLOPT_PORT);
@@ -1512,6 +1516,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
                case CURLOPT_REDIR_PROTOCOLS:
                case CURLOPT_PROTOCOLS:
 #endif
+               case CURLOPT_IPRESOLVE:
                        convert_to_long_ex(zvalue);
                        error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
                        break;