SOURCES: php-curl-limit-speed.patch (NEW) This patch allow to use ...

dzimi dzimi at pld-linux.org
Wed Mar 26 17:23:21 CET 2008


Author: dzimi                        Date: Wed Mar 26 16:23:21 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
This patch allow to use CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE to limiting upload/download speed using php-curl extension

---- Files affected:
SOURCES:
   php-curl-limit-speed.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/php-curl-limit-speed.patch
diff -u /dev/null SOURCES/php-curl-limit-speed.patch:1.1
--- /dev/null	Wed Mar 26 17:23:21 2008
+++ SOURCES/php-curl-limit-speed.patch	Wed Mar 26 17:23:16 2008
@@ -0,0 +1,30 @@
+--- php-5.2.5.orig/ext/curl/interface.c	2008-03-26 17:05:19.000000000 +0100
++++ php-5.2.5/ext/curl/interface.c	2008-03-26 17:09:05.000000000 +0100
+@@ -462,6 +462,14 @@
+ 	REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
+ #endif
+ 	REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
++
++/* Added constants to support limiting the transfer speed in PHP */
++/* Fixed by Tijnema (admin at tijnema.info) */
++#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
++	REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
++	REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
++#endif
++
+ 	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
+ 	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
+ 	REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
+@@ -1288,6 +1296,12 @@
+ #if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
+ 		case CURLOPT_TCP_NODELAY:
+ #endif
++/* Added case options to support limiting the transfer speed in PHP */
++/* Fixed by Tijnema (admin at tijnema.info) */
++#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
++		case CURLOPT_MAX_SEND_SPEED_LARGE:
++		case CURLOPT_MAX_RECV_SPEED_LARGE:
++#endif
+ 			convert_to_long_ex(zvalue);
+ 			error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
+ 			break;
================================================================


More information about the pld-cvs-commit mailing list