X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_api.c;h=92fe1ecffc54af71b6ea41dfe1b5aa7882cb548a;hp=289cac491d4ea003b0b082728dd960fd348a23b2;hb=aca5a5a21e4514707a71cfa69cc19ae50a78f5d3;hpb=6b07ab3988f234f92d537e865648e823217d6575 diff --git a/http_request_api.c b/http_request_api.c index 289cac4..92fe1ec 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -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 | + | Copyright (c) 2004-2007, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -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);