diff options
author | Pierrick Charron <pierrick@php.net> | 2010-05-14 06:29:54 +0000 |
---|---|---|
committer | Pierrick Charron <pierrick@php.net> | 2010-05-14 06:29:54 +0000 |
commit | 1386a6fcc6537edc8beb6ee767737eaf5ce1666a (patch) | |
tree | 6389941e9369b637494e851e156f1b63c313b085 /ext/curl | |
parent | 07619b7190665f47002fb48d890791b663e64b21 (diff) | |
download | php-git-1386a6fcc6537edc8beb6ee767737eaf5ce1666a.tar.gz |
Added support for CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE.
Diffstat (limited to 'ext/curl')
-rw-r--r-- | ext/curl/interface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index cf8a3892b9..edb4a30c87 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -579,6 +579,11 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE); REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD); +#if LIBCURL_VERSION_NUM > 0x070f04 /* CURLOPT_MAX_RECV_SPEED_LARGE & CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.15.5 */ + REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE); + REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE); +#endif + #if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */ REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH); /* http authentication options */ @@ -1672,6 +1677,13 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu #endif error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM > 0x070f04 + case CURLOPT_MAX_RECV_SPEED_LARGE: + case CURLOPT_MAX_SEND_SPEED_LARGE: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch->cp, option, (curl_off_t)Z_LVAL_PP(zvalue)); + break; +#endif case CURLOPT_FOLLOWLOCATION: convert_to_long_ex(zvalue); if (PG(open_basedir) && *PG(open_basedir)) { |