- fix copyright year
[m6w6/ext-http] / http_request_api.c
index 289cac491d4ea003b0b082728dd960fd348a23b2..92fe1ecffc54af71b6ea41dfe1b5aa7882cb548a 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -194,7 +194,7 @@ static curlioerr http_curl_ioctl_callback(CURL *, curliocmd, void *);
 #endif
 
 /* {{{ CURL *http_curl_init(http_request *) */
-PHP_HTTP_API CURL * _http_curl_init_ex(CURL *ch, http_request *request)
+PHP_HTTP_API CURL * _http_curl_init_ex(CURL *ch, http_request *request TSRMLS_DC)
 {
        if (ch || HTTP_CURL_HANDLE_CTOR(ch)) {
 #if defined(ZTS)
@@ -228,7 +228,7 @@ PHP_HTTP_API CURL * _http_curl_init_ex(CURL *ch, http_request *request)
 /* }}} */
 
 /* {{{ void http_curl_free(CURL **) */
-PHP_HTTP_API void _http_curl_free(CURL **ch)
+PHP_HTTP_API void _http_curl_free(CURL **ch TSRMLS_DC)
 {
        if (*ch) {
                curl_easy_setopt(*ch, CURLOPT_NOPROGRESS, 1L);
@@ -271,6 +271,8 @@ PHP_HTTP_API http_request *_http_request_init_ex(http_request *request, CURL *ch
 /* {{{ void http_request_dtor(http_request *) */
 PHP_HTTP_API void _http_request_dtor(http_request *request)
 {
+       TSRMLS_FETCH_FROM_CTX(request->tsrm_ls);
+       
        http_curl_free(&request->ch);
        http_request_reset(request);