[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c multi.c
pierrick Fri, 23 Dec 2011 21:01:05 + Revision: http://svn.php.net/viewvc?view=revision&revision=321359 Log: Coding standards Changed paths: U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/multi.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-23 19:52:57 UTC (rev 321358) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-23 21:01:05 UTC (rev 321359) @@ -960,7 +960,7 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */ -REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL); + REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL); #endif #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ @@ -1743,14 +1743,14 @@ char *split; if(org) { -do { + do { char *key; char *val; char *tmp; -split = strstr(s, "; "); -if(split) -*split = '\0'; + split = strstr(s, "; "); + if(split) + *split = '\0'; key = s; tmp = memchr(key, '=', 64); @@ -2672,7 +2672,7 @@ case CURLOPT_SHARE: { php_curlsh *sh = NULL; - ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); + ZEND_FETCH_RESOURCE(sh, php_curlsh *, zvalue, -1, le_curl_share_handle_name, le_curl_share_handle); if (sh) { curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } @@ -3237,7 +3237,7 @@ if (ch->handlers->fnmatch) { if (ch->handlers->fnmatch->func_name) { zval_ptr_dtor(&ch->handlers->fnmatch->func_name); - } + } efree(ch->handlers->fnmatch); ch->handlers->fnmatch = NULL; } Modified: php/php-src/trunk/ext/curl/multi.c === --- php/php-src/trunk/ext/curl/multi.c 2011-12-23 19:52:57 UTC (rev 321358) +++ php/php-src/trunk/ext/curl/multi.c 2011-12-23 21:01:05 UTC (rev 321359) @@ -125,8 +125,8 @@ static int curl_compare_resources( zval *z1, zval **z2 ) /* {{{ */ { return (Z_TYPE_P( z1 ) == Z_TYPE_PP( z2 ) && -Z_TYPE_P( z1 ) == IS_RESOURCE && -Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) ); + Z_TYPE_P( z1 ) == IS_RESOURCE && + Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) ); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Wed, 14 Dec 2011 04:02:56 + Revision: http://svn.php.net/viewvc?view=revision&revision=321002 Log: Unregister appropriate curl wrappers Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-14 03:45:44 UTC (rev 321001) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-14 04:02:56 UTC (rev 321002) @@ -1165,10 +1165,18 @@ PHP_MSHUTDOWN_FUNCTION(curl) { #ifdef PHP_CURL_URL_WRAPPERS - php_unregister_url_stream_wrapper("http" TSRMLS_CC); - php_unregister_url_stream_wrapper("https" TSRMLS_CC); - php_unregister_url_stream_wrapper("ftp" TSRMLS_CC); - php_unregister_url_stream_wrapper("ldap" TSRMLS_CC); + { + curl_version_info_data *info = curl_version_info(CURLVERSION_NOW); + char **p = (char **)info->protocols; + + while (*p != NULL) { + /* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */ + if (strncasecmp(*p, "file", sizeof("file")-1) != 0) { + php_unregister_url_stream_wrapper(*p TSRMLS_CC); + } + (void) *p++; + } + } #endif curl_global_cleanup(); #ifdef PHP_CURL_NEED_OPENSSL_TSL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pajoye Tue, 06 Dec 2011 16:09:06 + Revision: http://svn.php.net/viewvc?view=revision&revision=320511 Log: - fix the fix, wrong endif pos Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-06 15:57:43 UTC (rev 320510) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-06 16:09:06 UTC (rev 320511) @@ -1985,8 +1985,8 @@ } dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method; curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch); + } #endif - } efree(dupch->to_free); dupch->to_free = ch->to_free; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pajoye Tue, 06 Dec 2011 15:57:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=320510 Log: - fix build, CURLOPT_FNMATCH_DATA exists since 7.21.0 only Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-06 15:35:07 UTC (rev 320509) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-06 15:57:43 UTC (rev 320510) @@ -1975,6 +1975,8 @@ curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); } +/* Available since 7.21.0 */ +#if LIBCURL_VERSION_NUM >= 0x071500 if (ch->handlers->fnmatch) { dupch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); if (ch->handlers->fnmatch->func_name) { @@ -1982,7 +1984,6 @@ dupch->handlers->fnmatch->func_name = ch->handlers->fnmatch->func_name; } dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method; -#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch); #endif } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pajoye Tue, 06 Dec 2011 15:35:07 + Revision: http://svn.php.net/viewvc?view=revision&revision=320509 Log: - fix build, CURLOPT_FNMATCH_DATA exists since 7.21.0 only Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-06 14:15:27 UTC (rev 320508) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-06 15:35:07 UTC (rev 320509) @@ -1982,7 +1982,9 @@ dupch->handlers->fnmatch->func_name = ch->handlers->fnmatch->func_name; } dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method; +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch); +#endif } efree(dupch->to_free); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Mon, 05 Dec 2011 22:23:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=320466 Log: We should free the memory of any curl_slist returned by curl_easy_getinfo Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-05 21:55:40 UTC (rev 320465) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-05 22:23:19 UTC (rev 320466) @@ -3031,6 +3031,7 @@ add_next_index_string(return_value, slist->data, 1); slist = slist->next; } + curl_slist_free_all(slist); } else { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 21:24:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=320321 Log: Update curl MINFO Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 21:24:03 UTC (rev 320320) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 21:24:19 UTC (rev 320321) @@ -469,43 +469,41 @@ unsigned int i; static const struct feat feats[] = { -#if LIBCURL_VERSION_NUM > 0x070a06 /* 7.10.7 */ +#if LIBCURL_VERSION_NUM >= 0x070a07 /* 7.10.7 */ {"AsynchDNS", CURL_VERSION_ASYNCHDNS}, #endif -#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */ +#if LIBCURL_VERSION_NUM >= 0x070f04 /* 7.15.4 */ + {"CharConv", CURL_VERSION_CONV}, +#endif +#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */ {"Debug", CURL_VERSION_DEBUG}, {"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE}, #endif -#if LIBCURL_VERSION_NUM > 0x070b02 /* 7.12.0 */ +#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */ {"IDN", CURL_VERSION_IDN}, #endif -#ifdef CURL_VERSION_IPV6 {"IPv6", CURL_VERSION_IPV6}, -#endif -#if LIBCURL_VERSION_NUM > 0x070b00 /* 7.11.1 */ + {"krb4", CURL_VERSION_KERBEROS4}, +#if LIBCURL_VERSION_NUM >= 0x070b01 /* 7.11.1 */ {"Largefile", CURL_VERSION_LARGEFILE}, #endif -#if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */ + {"libz", CURL_VERSION_LIBZ}, +#if LIBCURL_VERSION_NUM >= 0x070a06 /* 7.10.6 */ {"NTLM", CURL_VERSION_NTLM}, #endif -#if LIBCURL_VERSION_NUM > 0x070a07 /* 7.10.8 */ +#if LIBCURL_VERSION_NUM >= 0x071600 /* 7.22.0 */ + {"NTLMWB", CURL_VERSION_NTLM_WB}, +#endif +#if LIBCURL_VERSION_NUM >= 0x070a08 /* 7.10.8 */ {"SPNEGO", CURL_VERSION_SPNEGO}, #endif -#ifdef CURL_VERSION_SSL {"SSL", CURL_VERSION_SSL}, -#endif -#if LIBCURL_VERSION_NUM > 0x070d01 /* 7.13.2 */ +#if LIBCURL_VERSION_NUM >= 0x070d02 /* 7.13.2 */ {"SSPI", CURL_VERSION_SSPI}, #endif -#ifdef CURL_VERSION_KERBEROS4 - {"krb4", CURL_VERSION_KERBEROS4}, +#if LIBCURL_VERSION_NUM >= 0x071504 /* 7.21.4 */ + {"TLS-SRP", CURL_VERSION_TLSAUTH_SRP}, #endif -#ifdef CURL_VERSION_LIBZ - {"libz", CURL_VERSION_LIBZ}, -#endif -#if LIBCURL_VERSION_NUM > 0x070f03 /* 7.15.4 */ - {"CharConv", CURL_VERSION_CONV}, -#endif {NULL, 0} }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c tests/curl_copy_handle_basic_008.phpt
pierrick Sun, 04 Dec 2011 01:16:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=320340 Log: Fix segfault when using curl_copy_handle with CURLOPT_PROGRESSFUNCTION Changed paths: U php/php-src/trunk/ext/curl/interface.c A php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:19:12 UTC (rev 320339) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-04 01:16:17 UTC (rev 320340) @@ -1965,6 +1965,26 @@ curl_easy_setopt(dupch->cp, CURLOPT_INFILE,(void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch); + if (ch->handlers->progress) { + dupch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + if (ch->handlers->progress->func_name) { + zval_add_ref(&ch->handlers->progress->func_name); + dupch->handlers->progress->func_name = ch->handlers->progress->func_name; + } + dupch->handlers->progress->method = ch->handlers->progress->method; + curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); + } + + if (ch->handlers->fnmatch) { + dupch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); + if (ch->handlers->fnmatch->func_name) { + zval_add_ref(&ch->handlers->fnmatch->func_name); + dupch->handlers->fnmatch->func_name = ch->handlers->fnmatch->func_name; + } + dupch->handlers->fnmatch->method = ch->handlers->fnmatch->method; + curl_easy_setopt(dupch->cp, CURLOPT_FNMATCH_DATA, (void *) dupch); + } + efree(dupch->to_free); dupch->to_free = ch->to_free; Added: php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt === --- php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt (rev 0) +++ php/php-src/trunk/ext/curl/tests/curl_copy_handle_basic_008.phpt 2011-12-04 01:16:17 UTC (rev 320340) @@ -0,0 +1,25 @@ +--TEST-- +Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Hello World! +Hello World! +Hello World! +Hello World! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c php_curl.h
pierrick Sun, 04 Dec 2011 00:19:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=320339 Log: add CURLOPT_WILDCARDMATCH and CURLOPT_FNMATCH_FUNCTION Changed paths: U php/php-src/trunk/ext/curl/interface.c U php/php-src/trunk/ext/curl/php_curl.h Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:03:56 UTC (rev 320338) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-04 00:19:12 UTC (rev 320339) @@ -1067,12 +1067,17 @@ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP); REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT); REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT); + REGISTER_CURL_CONSTANT(CURLOPT_FNMATCH_FUNCTION); + REGISTER_CURL_CONSTANT(CURLOPT_WILDCARDMATCH); REGISTER_CURL_CONSTANT(CURLPROTO_RTMP); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPE); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPS); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPT); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTE); - REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTS); + REGISTER_CURL_CONSTANT(CURLPROTO_RTMPTS); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_FAIL); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_MATCH); + REGISTER_CURL_CONSTANT(CURL_FNMATCHFUNC_NOMATCH); #endif #if LIBCURL_VERSION_NUM >= 0x071502 /* Available since 7.21.2 */ @@ -1275,6 +1280,71 @@ } /* }}} */ +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ +/* {{{ curl_fnmatch + */ +static int curl_fnmatch(void *ctx, const char *pattern, const char *string) +{ + php_curl *ch = (php_curl *) ctx; + php_curl_fnmatch *t = ch->handlers->fnmatch; + int rval = CURL_FNMATCHFUNC_FAIL; + switch (t->method) { + case PHP_CURL_USER: { + zval **argv[3]; + zval *zhandle = NULL; + zval *zpattern = NULL; + zval *zstring = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + + MAKE_STD_ZVAL(zhandle); + MAKE_STD_ZVAL(zpattern); + MAKE_STD_ZVAL(zstring); + + ZVAL_RESOURCE(zhandle, ch->id); + zend_list_addref(ch->id); + ZVAL_STRING(zpattern, pattern, 1); + ZVAL_STRING(zstring, string, 1); + + argv[0] = &zhandle; + argv[1] = &zpattern; + argv[2] = &zstring; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t->func_name; + fci.object_ptr = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 3; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch->in_callback = 1; + error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC); + ch->in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_FNMATCH_FUNCTION"); + } else if (retval_ptr) { + if (Z_TYPE_P(retval_ptr) != IS_LONG) { + convert_to_long_ex(&retval_ptr); + } + rval = Z_LVAL_P(retval_ptr); + zval_ptr_dtor(&retval_ptr); + } + zval_ptr_dtor(argv[0]); + zval_ptr_dtor(argv[1]); + zval_ptr_dtor(argv[2]); + break; + } + } + return rval; +} +/* }}} */ +#endif + /* {{{ curl_progress */ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) @@ -1650,6 +1720,9 @@ (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); (*ch)->handlers->progress = NULL; +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + (*ch)->handlers->fnmatch = NULL; +#endif (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -2034,6 +2107,9 @@ case CURLOPT_RTSP_REQUEST: case CURLOPT_RTSP_SERVER_CSEQ: #endif +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + case CURLOPT_WILDCARDMATCH: +#endif #if LIBCURL
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:53:27 + Revision: http://svn.php.net/viewvc?view=revision&revision=320335 Log: Add the curl handle to the progress callback function Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:53:05 UTC (rev 320334) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:53:27 UTC (rev 320335) @@ -1290,7 +1290,8 @@ switch (t->method) { case PHP_CURL_USER: { - zval **argv[4]; + zval **argv[5]; + zval *handle = NULL; zval *zdltotal = NULL; zval *zdlnow = NULL; zval *zultotal = NULL; @@ -1300,27 +1301,31 @@ zend_fcall_info fci; TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + MAKE_STD_ZVAL(handle); MAKE_STD_ZVAL(zdltotal); MAKE_STD_ZVAL(zdlnow); MAKE_STD_ZVAL(zultotal); MAKE_STD_ZVAL(zulnow); + ZVAL_RESOURCE(handle, ch->id); + zend_list_addref(ch->id); ZVAL_LONG(zdltotal, (long) dltotal); ZVAL_LONG(zdlnow, (long) dlnow); ZVAL_LONG(zultotal, (long) ultotal); ZVAL_LONG(zulnow, (long) ulnow); - argv[0] = &zdltotal; - argv[1] = &zdlnow; - argv[2] = &zultotal; - argv[3] = &zulnow; + argv[0] = &handle; + argv[1] = &zdltotal; + argv[2] = &zdlnow; + argv[3] = &zultotal; + argv[4] = &zulnow; fci.size = sizeof(fci); fci.function_table = EG(function_table); fci.function_name = t->func_name; fci.object_ptr = NULL; fci.retval_ptr_ptr = &retval_ptr; - fci.param_count = 4; + fci.param_count = 5; fci.params = argv; fci.no_separation = 0; fci.symbol_table = NULL; @@ -1343,6 +1348,7 @@ zval_ptr_dtor(argv[1]); zval_ptr_dtor(argv[2]); zval_ptr_dtor(argv[3]); + zval_ptr_dtor(argv[4]); break; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:43:44 + Revision: http://svn.php.net/viewvc?view=revision&revision=320332 Log: The progress handle don't need to be allocated unless curl_setopt with CURLOPT_PROGRESSFUNCTION is called Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:40:38 UTC (rev 320331) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:43:44 UTC (rev 320332) @@ -1643,7 +1643,7 @@ (*ch)->handlers->write= ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); - (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + (*ch)->handlers->progress = NULL; (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -2447,7 +2447,9 @@ case CURLOPT_PROGRESSFUNCTION: curl_easy_setopt(ch->cp, CURLOPT_PROGRESSFUNCTION, curl_progress); curl_easy_setopt(ch->cp, CURLOPT_PROGRESSDATA, ch); - if (ch->handlers->progress->func_name) { + if (NULL == ch->handlers->progress) { + ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); + } else if (ch->handlers->progress->func_name) { zval_ptr_dtor(&ch->handlers->progress->func_name); ch->handlers->progress->fci_cache = empty_fcall_info_cache; } @@ -3020,9 +3022,6 @@ if (ch->handlers->write_header->func_name) { zval_ptr_dtor(&ch->handlers->write_header->func_name); } - if (ch->handlers->progress->func_name) { - zval_ptr_dtor(&ch->handlers->progress->func_name); - } if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); } @@ -3046,7 +3045,14 @@ efree(ch->handlers->write); efree(ch->handlers->write_header); efree(ch->handlers->read); - efree(ch->handlers->progress); + + if (ch->handlers->progress) { + if (ch->handlers->progress->func_name) { + zval_ptr_dtor(&ch->handlers->progress->func_name); + } + efree(ch->handlers->progress); + } + efree(ch->handlers); efree(ch); } @@ -3093,12 +3099,13 @@ ch->handlers->std_err = NULL; } - if (ch->handlers->progress->func_name) { - zval_ptr_dtor(&ch->handlers->progress->func_name); - ch->handlers->progress->fci_cache = empty_fcall_info_cache; - ch->handlers->progress->func_name = NULL; + if (ch->handlers->progress) { + if (ch->handlers->progress->func_name) { + zval_ptr_dtor(&ch->handlers->progress->func_name); + } + efree(ch->handlers->progress); + ch->handlers->progress = NULL; } - ch->handlers->progress->method = 0; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 23:21:43 + Revision: http://svn.php.net/viewvc?view=revision&revision=320329 Log: useless variable Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:08:55 UTC (rev 320328) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 23:21:43 UTC (rev 320329) @@ -1281,7 +1281,6 @@ { php_curl *ch = (php_curl *) clientp; php_curl_progress *t = ch->handlers->progress; - int length = -1; size_t rval = 0; #if PHP_CURL_DEBUG @@ -1331,7 +1330,6 @@ ch->in_callback = 0; if (error == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION"); - length = -1; } else if (retval_ptr) { if (Z_TYPE_P(retval_ptr) != IS_LONG) { convert_to_long_ex(&retval_ptr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Sat, 03 Dec 2011 20:16:32 + Revision: http://svn.php.net/viewvc?view=revision&revision=320314 Log: Clean curl_getinfo and add new constants from newer libcurl versions Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-12-03 20:14:06 UTC (rev 320313) +++ php/php-src/trunk/ext/curl/interface.c 2011-12-03 20:16:32 UTC (rev 320314) @@ -832,7 +832,8 @@ REGISTER_CURL_CONSTANT(CURLAUTH_NTLM); #endif -#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */ +#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */ + REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CONNECTCODE); REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS); REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH); #endif @@ -840,7 +841,9 @@ #if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */ REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED); REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL); + REGISTER_CURL_CONSTANT(CURLINFO_HTTPAUTH_AVAIL); REGISTER_CURL_CONSTANT(CURLINFO_RESPONSE_CODE); + REGISTER_CURL_CONSTANT(CURLINFO_PROXYAUTH_AVAIL); REGISTER_CURL_CONSTANT(CURLOPT_FTP_RESPONSE_TIMEOUT); REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE); REGISTER_CURL_CONSTANT(CURLOPT_MAXFILESIZE); @@ -874,7 +877,17 @@ REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY); #endif +#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */ + REGISTER_CURL_CONSTANT(CURLINFO_OS_ERRNO); +#endif + +#if LIBCURL_VERSION_NUM >= 0x070c03 /* Available since 7.12.3 */ + REGISTER_CURL_CONSTANT(CURLINFO_NUM_CONNECTS); + REGISTER_CURL_CONSTANT(CURLINFO_SSL_ENGINES); +#endif + #if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */ + REGISTER_CURL_CONSTANT(CURLINFO_COOKIELIST); REGISTER_CURL_CONSTANT(CURLOPT_COOKIELIST); REGISTER_CURL_CONSTANT(CURLOPT_IGNORE_CONTENT_LENGTH); #endif @@ -899,6 +912,10 @@ REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); #endif +#if LIBCURL_VERSION_NUM >- 0x070f04 /* Available since 7.15.4 */ + REGISTER_CURL_CONSTANT(CURLINFO_FTP_ENTRY_PATH); +#endif + #if LIBCURL_VERSION_NUM >= 0x070f05 /* Available since 7.15.5 */ REGISTER_CURL_CONSTANT(CURLOPT_FTP_ALTERNATIVE_TO_USER); REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE); @@ -950,15 +967,18 @@ #if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ REGISTER_CURL_CONSTANT(CURLE_SSH); + REGISTER_CURL_CONSTANT(CURLINFO_APPCONNECT_TIME); + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP); + REGISTER_CURL_CONSTANT(CURLOPT_ADDRESS_SCOPE); REGISTER_CURL_CONSTANT(CURLOPT_CRLFILE); REGISTER_CURL_CONSTANT(CURLOPT_ISSUERCERT); REGISTER_CURL_CONSTANT(CURLOPT_KEYPASSWD); + REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); REGISTER_CURL_CONSTANT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5); REGISTER_CURL_CONSTANT(CURLOPT_SSH_PRIVATE_KEYFILE); REGISTER_CURL_CONSTANT(CURLOPT_SSH_PUBLIC_KEYFILE); - REGISTER_CURL_CONSTANT(CURLOPT_SSH_AUTH_TYPES); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_ANY); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_DEFAULT); REGISTER_CURL_CONSTANT(CURLSSH_AUTH_HOST); @@ -983,12 +1003,15 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */ + REGISTER_CURL_CONSTANT(CURLINFO_CONDITION_UNMET); + REGISTER_CURL_CONSTANT(CURLOPT_NOPROXY); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_NEC); REGISTER_CURL_CONSTANT(CURLOPT_SOCKS5_GSSAPI_SERVICE); REGISTER_CURL_CONSTANT(CURLOPT_TFTP_BLKSIZE); + REGISTER_CURL_CONSTANT(CURLPROTO_ALL); REGISTER_CURL_CONSTANT(CURLPROTO_DICT); REGISTER_CURL_CONSTANT(CURLPROTO_FILE); @@ -1009,6 +1032,10 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CLIENT_CSEQ); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_CSEQ_RECV); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ); + REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID); REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM); REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT); @@ -1039,6 +1066,9 @@ #endif #if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP); + REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT); + REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT); REGISTER_CURL_CONSTANT(CURLPROTO_RTMP); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPE); REGISTER_CURL_CONSTANT(CURLPROTO_RTMPS); @@ -2786,18 +2816,25 @@ if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_TIME, &d_code) == CURLE_OK) { CAAD("redirect_time", d_code); } -#if LIBCURL_VERSION_NUM > 0x071301 +#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */ + if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_URL, &s_code) == CURLE_OK) { + CAAS("redirect_url", s_code); + } +#endif +#if LIBCURL_VERSION_NUM >=
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pierrick Wed, 23 Nov 2011 19:36:52 + Revision: http://svn.php.net/viewvc?view=revision&revision=319724 Log: Fix build for libcurl < 7.20.0 Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-23 18:46:03 UTC (rev 319723) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-23 19:36:52 UTC (rev 319724) @@ -2328,9 +2328,11 @@ case CURLOPT_PREQUOTE: name = "CURLOPT_PREQUOTE"; break; +#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ case CURLOPT_MAIL_RCPT: name = "CURLOPT_MAIL_RCPT"; break; +#endif #if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ case CURLOPT_RESOLVE: name = "CURLOPT_RESOLVE"; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
Thanks :) On 22 November 2011 16:10, Felipe Pena wrote: > felipe Tue, 22 Nov 2011 21:10:24 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=319702 > > Log: > - Fix build (using libcurl 7.21.0) > > Changed paths: > U php/php-src/trunk/ext/curl/interface.c > > Modified: php/php-src/trunk/ext/curl/interface.c > === > --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 20:01:32 UTC (rev > 319701) > +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 21:10:24 UTC (rev > 319702) > @@ -767,10 +767,10 @@ > REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECORD); > REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECEIVE); > #endif > -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > REGISTER_CURL_CONSTANT(CURLOPT_RESOLVE); > #endif > -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ > +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ > REGISTER_CURL_CONSTANT(CURLOPT_ACCEPT_ENCODING); > REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING); > #endif > @@ -1970,7 +1970,7 @@ > case CURLOPT_SSLENGINE: > case CURLOPT_SSLENGINE_DEFAULT: > case CURLOPT_SSLCERTTYPE: > -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ > +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ > case CURLOPT_ACCEPT_ENCODING: > case CURLOPT_TRANSFER_ENCODING: > #else > @@ -2300,7 +2300,7 @@ > #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ > case CURLOPT_MAIL_RCPT: > #endif > -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > case CURLOPT_RESOLVE: > #endif > { > @@ -2330,9 +2330,11 @@ > case CURLOPT_MAIL_RCPT: > name = "CURLOPT_MAIL_RCPT"; > break; > +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ > case CURLOPT_RESOLVE: > name = "CURLOPT_RESOLVE"; > break; > +#endif > } > php_error_docref(NULL TSRMLS_CC, E_WARNING, > "You must pass either an object or an array with the %s argument", name); > RETVAL_FALSE; > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
felipe Tue, 22 Nov 2011 21:10:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=319702 Log: - Fix build (using libcurl 7.21.0) Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-11-22 20:01:32 UTC (rev 319701) +++ php/php-src/trunk/ext/curl/interface.c 2011-11-22 21:10:24 UTC (rev 319702) @@ -767,10 +767,10 @@ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECORD); REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECEIVE); #endif -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ REGISTER_CURL_CONSTANT(CURLOPT_RESOLVE); #endif -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ REGISTER_CURL_CONSTANT(CURLOPT_ACCEPT_ENCODING); REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING); #endif @@ -1970,7 +1970,7 @@ case CURLOPT_SSLENGINE: case CURLOPT_SSLENGINE_DEFAULT: case CURLOPT_SSLCERTTYPE: -#if LIBCURL_VERSION_NUM >= 0x071406 /* Available since 7.21.6 */ +#if LIBCURL_VERSION_NUM >= 0x071506 /* Available since 7.21.6 */ case CURLOPT_ACCEPT_ENCODING: case CURLOPT_TRANSFER_ENCODING: #else @@ -2300,7 +2300,7 @@ #if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ case CURLOPT_MAIL_RCPT: #endif -#if LIBCURL_VERSION_NUM >= 0x071403 /* Available since 7.21.3 */ +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ case CURLOPT_RESOLVE: #endif { @@ -2330,9 +2330,11 @@ case CURLOPT_MAIL_RCPT: name = "CURLOPT_MAIL_RCPT"; break; +#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */ case CURLOPT_RESOLVE: name = "CURLOPT_RESOLVE"; break; +#endif } php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must pass either an object or an array with the %s argument", name); RETVAL_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
pajoye Fri, 01 Apr 2011 17:10:52 + Revision: http://svn.php.net/viewvc?view=revision&revision=309880 Log: - [doc] add ini option to set the default cainfo file, in case none was set at compile time Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2011-04-01 16:00:11 UTC (rev 309879) +++ php/php-src/trunk/ext/curl/interface.c 2011-04-01 17:10:52 UTC (rev 309880) @@ -329,6 +329,13 @@ ZEND_GET_MODULE (curl) #endif +/* {{{ PHP_INI_BEGIN */ +PHP_INI_BEGIN() + PHP_INI_ENTRY("curl.cainfo", "", PHP_INI_SYSTEM, NULL) +PHP_INI_END() +/* }}} */ + +/* }}} */ /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(curl) @@ -456,6 +463,8 @@ le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number); + REGISTER_INI_ENTRIES(); + /* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions or curl src/docs/libcurl/symbols-in-versions for a (almost) complete list of options and which version they were introduced */ @@ -882,6 +891,7 @@ php_curl_openssl_tsl = NULL; } #endif + UNREGISTER_INI_ENTRIES(); return SUCCESS; } /* }}} */ @@ -1430,6 +1440,7 @@ zval*clone; char*url = NULL; int url_len = 0; + char *cainfo; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &url, &url_len) == FAILURE) { return; @@ -1468,6 +1479,12 @@ curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1); curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120); curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */ + + cainfo = INI_STR("curl.cainfo"); + if (cainfo && strlen(cainfo) > 0) { + curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo); + } + #if defined(ZTS) curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/curl/ interface.c
scottmac Fri, 10 Dec 2010 01:45:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=306162 Log: Add more constants to curl_getinfo(), dependent on cURL version installed so wrapped in ifdefs Changed paths: U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2010-12-10 01:32:16 UTC (rev 306161) +++ php/php-src/trunk/ext/curl/interface.c 2010-12-10 01:45:55 UTC (rev 306162) @@ -2315,12 +2315,33 @@ create_certinfo(ci, listcode TSRMLS_CC); CAAZ("certinfo", listcode); } + if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_IP, &s_code) == CURLE_OK) { + CAAS("primary_ip", s_code); + } #endif +#if LIBCURL_VERSION_NUM > 0x071500 + if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_PORT, &l_code) == CURLE_OK) { + CAAL("primary_port", l_code); + } + if (curl_easy_getinfo(ch->cp, CURLINFO_LOCAL_IP, &s_code) == CURLE_OK) { + CAAS("local_ip", s_code); + } + if (curl_easy_getinfo(ch->cp, CURLINFO_LOCAL_PORT, &l_code) == CURLE_OK) { + CAAL("local_port", l_code); + } +#endif if (ch->header.str_len > 0) { CAAS("request_header", ch->header.str); } } else { switch (option) { + /* string variable types */ +#if LIBCURL_VERSION_NUM >= 0x071500 + case CURLINFO_PRIMARY_IP: +#endif +#if LIBCURL_VERSION_NUM >= 0x071500 + case CURLINFO_LOCAL_IP: +#endif case CURLINFO_PRIVATE: case CURLINFO_EFFECTIVE_URL: case CURLINFO_CONTENT_TYPE: { @@ -2333,6 +2354,11 @@ } break; } + /* Long variable types */ +#if LIBCURL_VERSION_NUM >= 0x071500 + case CURLINFO_PRIMARY_PORT: + case CURLINFO_LOCAL_PORT: +#endif case CURLINFO_HTTP_CODE: case CURLINFO_HEADER_SIZE: case CURLINFO_REQUEST_SIZE: @@ -2348,6 +2374,7 @@ } break; } + /* Double variable types */ case CURLINFO_TOTAL_TIME: case CURLINFO_NAMELOOKUP_TIME: case CURLINFO_CONNECT_TIME: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/php-src/trunk/ext/curl/ interface.c
felipe Fri, 17 Jul 2009 00:24:20 + URL: http://svn.php.net/viewvc?view=revision&revision=284216 Changed paths: U php/php-src/trunk/ext/curl/interface.c Log: - Fixed bug #48893 (Problems compiling with Curl) Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-07-17 00:01:26 UTC (rev 284215) +++ php/php-src/trunk/ext/curl/interface.c 2009-07-17 00:24:20 UTC (rev 284216) @@ -781,6 +781,9 @@ #if LIBCURL_VERSION_NUM >= 0x070f01 REGISTER_CURL_CONSTANT(CURLOPT_FTP_FILEMETHOD); +#endif + +#if LIBCURL_VERSION_NUM >= 0x071001 REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD); REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD); REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php