Lines Matching refs:handlers

215 	if (!ch || !ch->handlers) {  in _php_curl_verify_handlers()
219 if (ch->handlers->std_err) { in _php_curl_verify_handlers()
220 …stream = (php_stream *) zend_fetch_resource(&ch->handlers->std_err TSRMLS_CC, -1, NULL, NULL, 2, p… in _php_curl_verify_handlers()
225 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_verify_handlers()
226 ch->handlers->std_err = NULL; in _php_curl_verify_handlers()
231 if (ch->handlers->read && ch->handlers->read->stream) { in _php_curl_verify_handlers()
232 …stream = (php_stream *) zend_fetch_resource(&ch->handlers->read->stream TSRMLS_CC, -1, NULL, NULL,… in _php_curl_verify_handlers()
237 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_verify_handlers()
238 ch->handlers->read->fd = 0; in _php_curl_verify_handlers()
239 ch->handlers->read->fp = 0; in _php_curl_verify_handlers()
240 ch->handlers->read->stream = NULL; in _php_curl_verify_handlers()
245 if (ch->handlers->write_header && ch->handlers->write_header->stream) { in _php_curl_verify_handlers()
246 …stream = (php_stream *) zend_fetch_resource(&ch->handlers->write_header->stream TSRMLS_CC, -1, NUL… in _php_curl_verify_handlers()
251 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_verify_handlers()
252 ch->handlers->write_header->fp = 0; in _php_curl_verify_handlers()
253 ch->handlers->write_header->stream = NULL; in _php_curl_verify_handlers()
255 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_verify_handlers()
259 if (ch->handlers->write && ch->handlers->write->stream) { in _php_curl_verify_handlers()
260 …stream = (php_stream *) zend_fetch_resource(&ch->handlers->write->stream TSRMLS_CC, -1, NULL, NULL… in _php_curl_verify_handlers()
265 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_verify_handlers()
266 ch->handlers->write->fp = 0; in _php_curl_verify_handlers()
267 ch->handlers->write->stream = NULL; in _php_curl_verify_handlers()
269 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_verify_handlers()
270 ch->handlers->write->type = PHP_CURL_ASCII; in _php_curl_verify_handlers()
1000 php_curl_write *t = ch->handlers->write; in curl_write()
1077 php_curl_progress *t = ch->handlers->progress; in curl_progress()
1153 php_curl_read *t = ch->handlers->read; in curl_read()
1229 php_curl_write *t = ch->handlers->write_header; in curl_write_header()
1237 if (ch->handlers->write->method == PHP_CURL_RETURN && length > 0) { in curl_write_header()
1238 smart_str_appendl(&ch->handlers->write->buf, data, (int) length); in curl_write_header()
1327 zval *func = ch->handlers->passwd; in curl_passwd()
1439 (*ch)->handlers = ecalloc(1, sizeof(php_curl_handlers)); in alloc_curl_handle()
1440 (*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write)); in alloc_curl_handle()
1441 (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); in alloc_curl_handle()
1442 (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); in alloc_curl_handle()
1443 (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); in alloc_curl_handle()
1449 (*ch)->handlers->write->stream = NULL; in alloc_curl_handle()
1450 (*ch)->handlers->write_header->stream = NULL; in alloc_curl_handle()
1451 (*ch)->handlers->read->stream = NULL; in alloc_curl_handle()
1565 ch->handlers->write->method = PHP_CURL_STDOUT; in PHP_FUNCTION()
1566 ch->handlers->write->type = PHP_CURL_ASCII; in PHP_FUNCTION()
1567 ch->handlers->read->method = PHP_CURL_DIRECT; in PHP_FUNCTION()
1568 ch->handlers->write_header->method = PHP_CURL_IGNORE; in PHP_FUNCTION()
1635 if (ch->handlers->write->stream) { in PHP_FUNCTION()
1636 Z_ADDREF_P(ch->handlers->write->stream); in PHP_FUNCTION()
1638 dupch->handlers->write->stream = ch->handlers->write->stream; in PHP_FUNCTION()
1639 dupch->handlers->write->method = ch->handlers->write->method; in PHP_FUNCTION()
1640 dupch->handlers->write->type = ch->handlers->write->type; in PHP_FUNCTION()
1641 if (ch->handlers->read->stream) { in PHP_FUNCTION()
1642 Z_ADDREF_P(ch->handlers->read->stream); in PHP_FUNCTION()
1644 dupch->handlers->read->stream = ch->handlers->read->stream; in PHP_FUNCTION()
1645 dupch->handlers->read->method = ch->handlers->read->method; in PHP_FUNCTION()
1646 dupch->handlers->write_header->method = ch->handlers->write_header->method; in PHP_FUNCTION()
1647 if (ch->handlers->write_header->stream) { in PHP_FUNCTION()
1648 Z_ADDREF_P(ch->handlers->write_header->stream); in PHP_FUNCTION()
1650 dupch->handlers->write_header->stream = ch->handlers->write_header->stream; in PHP_FUNCTION()
1652 dupch->handlers->write->fp = ch->handlers->write->fp; in PHP_FUNCTION()
1653 dupch->handlers->write_header->fp = ch->handlers->write_header->fp; in PHP_FUNCTION()
1654 dupch->handlers->read->fp = ch->handlers->read->fp; in PHP_FUNCTION()
1655 dupch->handlers->read->fd = ch->handlers->read->fd; in PHP_FUNCTION()
1657 if (ch->handlers->passwd) { in PHP_FUNCTION()
1658 zval_add_ref(&ch->handlers->passwd); in PHP_FUNCTION()
1659 dupch->handlers->passwd = ch->handlers->passwd; in PHP_FUNCTION()
1663 if (ch->handlers->write->func_name) { in PHP_FUNCTION()
1664 zval_add_ref(&ch->handlers->write->func_name); in PHP_FUNCTION()
1665 dupch->handlers->write->func_name = ch->handlers->write->func_name; in PHP_FUNCTION()
1667 if (ch->handlers->read->func_name) { in PHP_FUNCTION()
1668 zval_add_ref(&ch->handlers->read->func_name); in PHP_FUNCTION()
1669 dupch->handlers->read->func_name = ch->handlers->read->func_name; in PHP_FUNCTION()
1671 if (ch->handlers->write_header->func_name) { in PHP_FUNCTION()
1672 zval_add_ref(&ch->handlers->write_header->func_name); in PHP_FUNCTION()
1673 dupch->handlers->write_header->func_name = ch->handlers->write_header->func_name; in PHP_FUNCTION()
1676 if (ch->handlers->progress->func_name) { in PHP_FUNCTION()
1677 zval_add_ref(&ch->handlers->progress->func_name); in PHP_FUNCTION()
1678 dupch->handlers->progress->func_name = ch->handlers->progress->func_name; in PHP_FUNCTION()
1680 dupch->handlers->progress->method = ch->handlers->progress->method; in PHP_FUNCTION()
1930 if (ch->handlers->write->stream) { in _php_curl_setopt()
1931 Z_DELREF_P(ch->handlers->write->stream); in _php_curl_setopt()
1934 ch->handlers->write->fp = fp; in _php_curl_setopt()
1935 ch->handlers->write->method = PHP_CURL_FILE; in _php_curl_setopt()
1936 ch->handlers->write->stream = *zvalue; in _php_curl_setopt()
1945 if (ch->handlers->write_header->stream) { in _php_curl_setopt()
1946 Z_DELREF_P(ch->handlers->write_header->stream); in _php_curl_setopt()
1949 ch->handlers->write_header->fp = fp; in _php_curl_setopt()
1950 ch->handlers->write_header->method = PHP_CURL_FILE; in _php_curl_setopt()
1951 ch->handlers->write_header->stream = *zvalue; in _php_curl_setopt()
1959 if (ch->handlers->read->stream) { in _php_curl_setopt()
1960 Z_DELREF_P(ch->handlers->read->stream); in _php_curl_setopt()
1963 ch->handlers->read->fp = fp; in _php_curl_setopt()
1964 ch->handlers->read->fd = Z_LVAL_PP(zvalue); in _php_curl_setopt()
1965 ch->handlers->read->stream = *zvalue; in _php_curl_setopt()
1969 if (ch->handlers->std_err) { in _php_curl_setopt()
1970 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_setopt()
1973 ch->handlers->std_err = *zvalue; in _php_curl_setopt()
1991 ch->handlers->write->method = PHP_CURL_RETURN; in _php_curl_setopt()
1993 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_setopt()
2000 ch->handlers->write->type = PHP_CURL_BINARY; in _php_curl_setopt()
2002 ch->handlers->write->type = PHP_CURL_ASCII; in _php_curl_setopt()
2006 if (ch->handlers->write->func_name) { in _php_curl_setopt()
2007 zval_ptr_dtor(&ch->handlers->write->func_name); in _php_curl_setopt()
2008 ch->handlers->write->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2011 ch->handlers->write->func_name = *zvalue; in _php_curl_setopt()
2012 ch->handlers->write->method = PHP_CURL_USER; in _php_curl_setopt()
2015 if (ch->handlers->read->func_name) { in _php_curl_setopt()
2016 zval_ptr_dtor(&ch->handlers->read->func_name); in _php_curl_setopt()
2017 ch->handlers->read->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2020 ch->handlers->read->func_name = *zvalue; in _php_curl_setopt()
2021 ch->handlers->read->method = PHP_CURL_USER; in _php_curl_setopt()
2026 if (ch->handlers->progress->func_name) { in _php_curl_setopt()
2027 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_setopt()
2028 ch->handlers->progress->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2031 ch->handlers->progress->func_name = *zvalue; in _php_curl_setopt()
2032 ch->handlers->progress->method = PHP_CURL_USER; in _php_curl_setopt()
2035 if (ch->handlers->write_header->func_name) { in _php_curl_setopt()
2036 zval_ptr_dtor(&ch->handlers->write_header->func_name); in _php_curl_setopt()
2037 ch->handlers->write_header->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2040 ch->handlers->write_header->func_name = *zvalue; in _php_curl_setopt()
2041 ch->handlers->write_header->method = PHP_CURL_USER; in _php_curl_setopt()
2045 if (ch->handlers->passwd) { in _php_curl_setopt()
2046 zval_ptr_dtor(&ch->handlers->passwd); in _php_curl_setopt()
2049 ch->handlers->passwd = *zvalue; in _php_curl_setopt()
2318 if (ch->handlers->write->buf.len > 0) { in _php_curl_cleanup_handle()
2319 smart_str_free(&ch->handlers->write->buf); in _php_curl_cleanup_handle()
2353 if (ch->handlers->write->buf.len > 0) { in PHP_FUNCTION()
2354 smart_str_free(&ch->handlers->write->buf); in PHP_FUNCTION()
2359 if (ch->handlers->std_err) { in PHP_FUNCTION()
2361 …stream = (php_stream*)zend_fetch_resource(&ch->handlers->std_err TSRMLS_CC, -1, NULL, NULL, 2, php… in PHP_FUNCTION()
2367 if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) { in PHP_FUNCTION()
2368 smart_str_0(&ch->handlers->write->buf); in PHP_FUNCTION()
2369 RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1); in PHP_FUNCTION()
2373 if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) { in PHP_FUNCTION()
2374 fflush(ch->handlers->write->fp); in PHP_FUNCTION()
2376 if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) { in PHP_FUNCTION()
2377 fflush(ch->handlers->write_header->fp); in PHP_FUNCTION()
2380 if (ch->handlers->write->method == PHP_CURL_RETURN) { in PHP_FUNCTION()
2703 if (ch->handlers->write->buf.len > 0) { in _php_curl_close_ex()
2704 smart_str_free(&ch->handlers->write->buf); in _php_curl_close_ex()
2706 if (ch->handlers->write->func_name) { in _php_curl_close_ex()
2707 zval_ptr_dtor(&ch->handlers->write->func_name); in _php_curl_close_ex()
2709 if (ch->handlers->read->func_name) { in _php_curl_close_ex()
2710 zval_ptr_dtor(&ch->handlers->read->func_name); in _php_curl_close_ex()
2712 if (ch->handlers->write_header->func_name) { in _php_curl_close_ex()
2713 zval_ptr_dtor(&ch->handlers->write_header->func_name); in _php_curl_close_ex()
2715 if (ch->handlers->progress->func_name) { in _php_curl_close_ex()
2716 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_close_ex()
2718 if (ch->handlers->passwd) { in _php_curl_close_ex()
2719 zval_ptr_dtor(&ch->handlers->passwd); in _php_curl_close_ex()
2721 if (ch->handlers->std_err) { in _php_curl_close_ex()
2722 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_close_ex()
2728 if (ch->handlers->write_header->stream) { in _php_curl_close_ex()
2729 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_close_ex()
2731 if (ch->handlers->write->stream) { in _php_curl_close_ex()
2732 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_close_ex()
2734 if (ch->handlers->read->stream) { in _php_curl_close_ex()
2735 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_close_ex()
2738 efree(ch->handlers->write); in _php_curl_close_ex()
2739 efree(ch->handlers->write_header); in _php_curl_close_ex()
2740 efree(ch->handlers->read); in _php_curl_close_ex()
2741 efree(ch->handlers->progress); in _php_curl_close_ex()
2742 efree(ch->handlers); in _php_curl_close_ex()