Lines Matching refs:handlers

237 	ZEND_ASSERT(ch && ch->handlers);  in _php_curl_verify_handlers()
239 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_verify_handlers()
240 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->std_err, NULL, php_file_le_stream(),… in _php_curl_verify_handlers()
245 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_verify_handlers()
246 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_verify_handlers()
251 if (ch->handlers->read && !Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_verify_handlers()
252 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->read->stream, NULL, php_file_le_stre… in _php_curl_verify_handlers()
257 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_verify_handlers()
258 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_verify_handlers()
259 ch->handlers->read->res = NULL; in _php_curl_verify_handlers()
260 ch->handlers->read->fp = 0; in _php_curl_verify_handlers()
265 if (ch->handlers->write_header && !Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_verify_handlers()
266 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->write_header->stream, NULL, php_file… in _php_curl_verify_handlers()
271 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_verify_handlers()
272 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_verify_handlers()
273 ch->handlers->write_header->fp = 0; in _php_curl_verify_handlers()
275 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_verify_handlers()
279 if (ch->handlers->write && !Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_verify_handlers()
280 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->write->stream, NULL, php_file_le_str… in _php_curl_verify_handlers()
285 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_verify_handlers()
286 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_verify_handlers()
287 ch->handlers->write->fp = 0; in _php_curl_verify_handlers()
289 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_verify_handlers()
1535 php_curl_write *t = ch->handlers->write; in curl_write()
1599 php_curl_fnmatch *t = ch->handlers->fnmatch; in curl_fnmatch()
1646 php_curl_progress *t = ch->handlers->progress; in curl_progress()
1700 php_curl_read *t = ch->handlers->read; in curl_read()
1763 php_curl_write *t = ch->handlers->write_header; in curl_write_header()
1770 if (ch->handlers->write->method == PHP_CURL_RETURN && length > 0) { in curl_write_header()
1771 smart_str_appendl(&ch->handlers->write->buf, data, (int) length); in curl_write_header()
1935 ch->handlers = ecalloc(1, sizeof(php_curl_handlers)); in alloc_curl_handle()
1936 ch->handlers->write = ecalloc(1, sizeof(php_curl_write)); in alloc_curl_handle()
1937 ch->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); in alloc_curl_handle()
1938 ch->handlers->read = ecalloc(1, sizeof(php_curl_read)); in alloc_curl_handle()
1939 ch->handlers->progress = NULL; in alloc_curl_handle()
1941 ch->handlers->fnmatch = NULL; in alloc_curl_handle()
2052 ch->handlers->write->method = PHP_CURL_STDOUT; in PHP_FUNCTION()
2053 ch->handlers->read->method = PHP_CURL_DIRECT; in PHP_FUNCTION()
2054 ch->handlers->write_header->method = PHP_CURL_IGNORE; in PHP_FUNCTION()
2072 if (!Z_ISUNDEF(source->handlers->write->stream)) { in _php_setup_easy_copy_handlers()
2073 Z_ADDREF(source->handlers->write->stream); in _php_setup_easy_copy_handlers()
2075 ch->handlers->write->stream = source->handlers->write->stream; in _php_setup_easy_copy_handlers()
2076 ch->handlers->write->method = source->handlers->write->method; in _php_setup_easy_copy_handlers()
2077 if (!Z_ISUNDEF(source->handlers->read->stream)) { in _php_setup_easy_copy_handlers()
2078 Z_ADDREF(source->handlers->read->stream); in _php_setup_easy_copy_handlers()
2080 ch->handlers->read->stream = source->handlers->read->stream; in _php_setup_easy_copy_handlers()
2081 ch->handlers->read->method = source->handlers->read->method; in _php_setup_easy_copy_handlers()
2082 ch->handlers->write_header->method = source->handlers->write_header->method; in _php_setup_easy_copy_handlers()
2083 if (!Z_ISUNDEF(source->handlers->write_header->stream)) { in _php_setup_easy_copy_handlers()
2084 Z_ADDREF(source->handlers->write_header->stream); in _php_setup_easy_copy_handlers()
2086 ch->handlers->write_header->stream = source->handlers->write_header->stream; in _php_setup_easy_copy_handlers()
2088 ch->handlers->write->fp = source->handlers->write->fp; in _php_setup_easy_copy_handlers()
2089 ch->handlers->write_header->fp = source->handlers->write_header->fp; in _php_setup_easy_copy_handlers()
2090 ch->handlers->read->fp = source->handlers->read->fp; in _php_setup_easy_copy_handlers()
2091 ch->handlers->read->res = source->handlers->read->res; in _php_setup_easy_copy_handlers()
2093 if (!Z_ISUNDEF(source->handlers->passwd)) { in _php_setup_easy_copy_handlers()
2094 ZVAL_COPY(&ch->handlers->passwd, &source->handlers->passwd); in _php_setup_easy_copy_handlers()
2098 if (!Z_ISUNDEF(source->handlers->write->func_name)) { in _php_setup_easy_copy_handlers()
2099 ZVAL_COPY(&ch->handlers->write->func_name, &source->handlers->write->func_name); in _php_setup_easy_copy_handlers()
2101 if (!Z_ISUNDEF(source->handlers->read->func_name)) { in _php_setup_easy_copy_handlers()
2102 ZVAL_COPY(&ch->handlers->read->func_name, &source->handlers->read->func_name); in _php_setup_easy_copy_handlers()
2104 if (!Z_ISUNDEF(source->handlers->write_header->func_name)) { in _php_setup_easy_copy_handlers()
2105 ZVAL_COPY(&ch->handlers->write_header->func_name, &source->handlers->write_header->func_name); in _php_setup_easy_copy_handlers()
2113 if (source->handlers->progress) { in _php_setup_easy_copy_handlers()
2114 ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); in _php_setup_easy_copy_handlers()
2115 if (!Z_ISUNDEF(source->handlers->progress->func_name)) { in _php_setup_easy_copy_handlers()
2116 ZVAL_COPY(&ch->handlers->progress->func_name, &source->handlers->progress->func_name); in _php_setup_easy_copy_handlers()
2118 ch->handlers->progress->method = source->handlers->progress->method; in _php_setup_easy_copy_handlers()
2123 if (source->handlers->fnmatch) { in _php_setup_easy_copy_handlers()
2124 ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); in _php_setup_easy_copy_handlers()
2125 if (!Z_ISUNDEF(source->handlers->fnmatch->func_name)) { in _php_setup_easy_copy_handlers()
2126 ZVAL_COPY(&ch->handlers->fnmatch->func_name, &source->handlers->fnmatch->func_name); in _php_setup_easy_copy_handlers()
2128 ch->handlers->fnmatch->method = source->handlers->fnmatch->method; in _php_setup_easy_copy_handlers()
2580 if (!Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_setopt()
2581 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_setopt()
2582 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_setopt()
2584 ch->handlers->write->fp = NULL; in _php_curl_setopt()
2585 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_setopt()
2587 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_setopt()
2588 ch->handlers->write->fp = fp; in _php_curl_setopt()
2589 ch->handlers->write->method = PHP_CURL_FILE; in _php_curl_setopt()
2590 ZVAL_COPY(&ch->handlers->write->stream, zvalue); in _php_curl_setopt()
2598 if (!Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_setopt()
2599 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_setopt()
2600 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_setopt()
2602 ch->handlers->write_header->fp = NULL; in _php_curl_setopt()
2603 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_setopt()
2605 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_setopt()
2606 ch->handlers->write_header->fp = fp; in _php_curl_setopt()
2607 ch->handlers->write_header->method = PHP_CURL_FILE; in _php_curl_setopt()
2608 ZVAL_COPY(&ch->handlers->write_header->stream, zvalue); in _php_curl_setopt()
2616 if (!Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_setopt()
2617 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_setopt()
2618 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_setopt()
2620 ch->handlers->read->fp = NULL; in _php_curl_setopt()
2621 ch->handlers->read->res = NULL; in _php_curl_setopt()
2623 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_setopt()
2624 ch->handlers->read->fp = fp; in _php_curl_setopt()
2625 ch->handlers->read->res = Z_RES_P(zvalue); in _php_curl_setopt()
2626 ZVAL_COPY(&ch->handlers->read->stream, zvalue); in _php_curl_setopt()
2631 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_setopt()
2632 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_setopt()
2633 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_setopt()
2636 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_setopt()
2637 ZVAL_COPY(&ch->handlers->std_err, zvalue); in _php_curl_setopt()
2762 if (!Z_ISUNDEF(ch->handlers->write_header->func_name)) { in _php_curl_setopt()
2763 zval_ptr_dtor(&ch->handlers->write_header->func_name); in _php_curl_setopt()
2764 ch->handlers->write_header->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2766 ZVAL_COPY(&ch->handlers->write_header->func_name, zvalue); in _php_curl_setopt()
2767 ch->handlers->write_header->method = PHP_CURL_USER; in _php_curl_setopt()
2940 if (ch->handlers->progress == NULL) { in _php_curl_setopt()
2941 ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); in _php_curl_setopt()
2942 } else if (!Z_ISUNDEF(ch->handlers->progress->func_name)) { in _php_curl_setopt()
2943 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_setopt()
2944 ch->handlers->progress->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2946 ZVAL_COPY(&ch->handlers->progress->func_name, zvalue); in _php_curl_setopt()
2947 ch->handlers->progress->method = PHP_CURL_USER; in _php_curl_setopt()
2951 if (!Z_ISUNDEF(ch->handlers->read->func_name)) { in _php_curl_setopt()
2952 zval_ptr_dtor(&ch->handlers->read->func_name); in _php_curl_setopt()
2953 ch->handlers->read->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2955 ZVAL_COPY(&ch->handlers->read->func_name, zvalue); in _php_curl_setopt()
2956 ch->handlers->read->method = PHP_CURL_USER; in _php_curl_setopt()
2961 ch->handlers->write->method = PHP_CURL_RETURN; in _php_curl_setopt()
2963 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_setopt()
2968 if (!Z_ISUNDEF(ch->handlers->write->func_name)) { in _php_curl_setopt()
2969 zval_ptr_dtor(&ch->handlers->write->func_name); in _php_curl_setopt()
2970 ch->handlers->write->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2972 ZVAL_COPY(&ch->handlers->write->func_name, zvalue); in _php_curl_setopt()
2973 ch->handlers->write->method = PHP_CURL_USER; in _php_curl_setopt()
3052 if (ch->handlers->fnmatch == NULL) { in _php_curl_setopt()
3053 ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); in _php_curl_setopt()
3054 } else if (!Z_ISUNDEF(ch->handlers->fnmatch->func_name)) { in _php_curl_setopt()
3055 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in _php_curl_setopt()
3056 ch->handlers->fnmatch->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
3058 ZVAL_COPY(&ch->handlers->fnmatch->func_name, zvalue); in _php_curl_setopt()
3059 ch->handlers->fnmatch->method = PHP_CURL_USER; in _php_curl_setopt()
3143 smart_str_free(&ch->handlers->write->buf); in _php_curl_cleanup_handle()
3178 smart_str_free(&ch->handlers->write->buf); in PHP_FUNCTION()
3182 if (!Z_ISUNDEF(ch->handlers->std_err)) { in PHP_FUNCTION()
3184 …stream = (php_stream*)zend_fetch_resource2_ex(&ch->handlers->std_err, NULL, php_file_le_stream(), … in PHP_FUNCTION()
3190 if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.s) { in PHP_FUNCTION()
3191 smart_str_0(&ch->handlers->write->buf); in PHP_FUNCTION()
3192 RETURN_STR_COPY(ch->handlers->write->buf.s); in PHP_FUNCTION()
3196 if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) { in PHP_FUNCTION()
3197 fflush(ch->handlers->write->fp); in PHP_FUNCTION()
3199 if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) { in PHP_FUNCTION()
3200 fflush(ch->handlers->write_header->fp); in PHP_FUNCTION()
3203 if (ch->handlers->write->method == PHP_CURL_RETURN) { in PHP_FUNCTION()
3582 smart_str_free(&ch->handlers->write->buf); in _php_curl_close_ex()
3583 zval_ptr_dtor(&ch->handlers->write->func_name); in _php_curl_close_ex()
3584 zval_ptr_dtor(&ch->handlers->read->func_name); in _php_curl_close_ex()
3585 zval_ptr_dtor(&ch->handlers->write_header->func_name); in _php_curl_close_ex()
3586 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_close_ex()
3591 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_close_ex()
3592 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_close_ex()
3593 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_close_ex()
3595 efree(ch->handlers->write); in _php_curl_close_ex()
3596 efree(ch->handlers->write_header); in _php_curl_close_ex()
3597 efree(ch->handlers->read); in _php_curl_close_ex()
3599 if (ch->handlers->progress) { in _php_curl_close_ex()
3600 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_close_ex()
3601 efree(ch->handlers->progress); in _php_curl_close_ex()
3605 if (ch->handlers->fnmatch) { in _php_curl_close_ex()
3606 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in _php_curl_close_ex()
3607 efree(ch->handlers->fnmatch); in _php_curl_close_ex()
3611 efree(ch->handlers); in _php_curl_close_ex()
3649 if (!Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_reset_handlers()
3650 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_reset_handlers()
3651 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_reset_handlers()
3653 ch->handlers->write->fp = NULL; in _php_curl_reset_handlers()
3654 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_reset_handlers()
3656 if (!Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_reset_handlers()
3657 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_reset_handlers()
3658 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_reset_handlers()
3660 ch->handlers->write_header->fp = NULL; in _php_curl_reset_handlers()
3661 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_reset_handlers()
3663 if (!Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_reset_handlers()
3664 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_reset_handlers()
3665 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_reset_handlers()
3667 ch->handlers->read->fp = NULL; in _php_curl_reset_handlers()
3668 ch->handlers->read->res = NULL; in _php_curl_reset_handlers()
3669 ch->handlers->read->method = PHP_CURL_DIRECT; in _php_curl_reset_handlers()
3671 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_reset_handlers()
3672 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_reset_handlers()
3673 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_reset_handlers()
3676 if (ch->handlers->progress) { in _php_curl_reset_handlers()
3677 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_reset_handlers()
3678 efree(ch->handlers->progress); in _php_curl_reset_handlers()
3679 ch->handlers->progress = NULL; in _php_curl_reset_handlers()
3683 if (ch->handlers->fnmatch) { in _php_curl_reset_handlers()
3684 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in _php_curl_reset_handlers()
3685 efree(ch->handlers->fnmatch); in _php_curl_reset_handlers()
3686 ch->handlers->fnmatch = NULL; in _php_curl_reset_handlers()