Lines Matching refs:handlers

151 	ZEND_ASSERT(ch && ch->handlers);  in _php_curl_verify_handlers()
153 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_verify_handlers()
154 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->std_err, NULL, php_file_le_stream(),… in _php_curl_verify_handlers()
159 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_verify_handlers()
160 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_verify_handlers()
165 if (ch->handlers->read && !Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_verify_handlers()
166 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->read->stream, NULL, php_file_le_stre… in _php_curl_verify_handlers()
171 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_verify_handlers()
172 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_verify_handlers()
173 ch->handlers->read->res = NULL; in _php_curl_verify_handlers()
174 ch->handlers->read->fp = 0; in _php_curl_verify_handlers()
179 if (ch->handlers->write_header && !Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_verify_handlers()
180 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->write_header->stream, NULL, php_file… in _php_curl_verify_handlers()
185 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_verify_handlers()
186 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_verify_handlers()
187 ch->handlers->write_header->fp = 0; in _php_curl_verify_handlers()
189 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_verify_handlers()
193 if (ch->handlers->write && !Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_verify_handlers()
194 …stream = (php_stream *)zend_fetch_resource2_ex(&ch->handlers->write->stream, NULL, php_file_le_str… in _php_curl_verify_handlers()
199 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_verify_handlers()
200 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_verify_handlers()
201 ch->handlers->write->fp = 0; in _php_curl_verify_handlers()
203 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_verify_handlers()
1220 intern->std.handlers = &curl_object_handlers; in curl_create_object()
1269 if (curl->handlers) { in curl_get_gc()
1270 if (curl->handlers->read) { in curl_get_gc()
1271 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->read->func_name); in curl_get_gc()
1272 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->read->stream); in curl_get_gc()
1275 if (curl->handlers->write) { in curl_get_gc()
1276 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->write->func_name); in curl_get_gc()
1277 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->write->stream); in curl_get_gc()
1280 if (curl->handlers->write_header) { in curl_get_gc()
1281 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->write_header->func_name); in curl_get_gc()
1282 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->write_header->stream); in curl_get_gc()
1285 if (curl->handlers->progress) { in curl_get_gc()
1286 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->progress->func_name); in curl_get_gc()
1290 if (curl->handlers->fnmatch) { in curl_get_gc()
1291 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->fnmatch->func_name); in curl_get_gc()
1295 zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers->std_err); in curl_get_gc()
1352 php_curl_write *t = ch->handlers->write; in curl_write()
1414 php_curl_fnmatch *t = ch->handlers->fnmatch; in curl_fnmatch()
1459 php_curl_progress *t = ch->handlers->progress; in curl_progress()
1512 php_curl_read *t = ch->handlers->read; in curl_read()
1574 php_curl_write *t = ch->handlers->write_header; in curl_write_header()
1581 if (ch->handlers->write->method == PHP_CURL_RETURN && length > 0) { in curl_write_header()
1582 smart_str_appendl(&ch->handlers->write->buf, data, (int) length); in curl_write_header()
1759 ch->handlers = ecalloc(1, sizeof(php_curl_handlers)); in init_curl_handle()
1760 ch->handlers->write = ecalloc(1, sizeof(php_curl_write)); in init_curl_handle()
1761 ch->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); in init_curl_handle()
1762 ch->handlers->read = ecalloc(1, sizeof(php_curl_read)); in init_curl_handle()
1763 ch->handlers->progress = NULL; in init_curl_handle()
1764 ch->handlers->fnmatch = NULL; in init_curl_handle()
1871 ch->handlers->write->method = PHP_CURL_STDOUT; in PHP_FUNCTION()
1872 ch->handlers->read->method = PHP_CURL_DIRECT; in PHP_FUNCTION()
1873 ch->handlers->write_header->method = PHP_CURL_IGNORE; in PHP_FUNCTION()
1888 if (!Z_ISUNDEF(source->handlers->write->stream)) { in _php_setup_easy_copy_handlers()
1889 Z_ADDREF(source->handlers->write->stream); in _php_setup_easy_copy_handlers()
1891 ch->handlers->write->stream = source->handlers->write->stream; in _php_setup_easy_copy_handlers()
1892 ch->handlers->write->method = source->handlers->write->method; in _php_setup_easy_copy_handlers()
1893 if (!Z_ISUNDEF(source->handlers->read->stream)) { in _php_setup_easy_copy_handlers()
1894 Z_ADDREF(source->handlers->read->stream); in _php_setup_easy_copy_handlers()
1896 ch->handlers->read->stream = source->handlers->read->stream; in _php_setup_easy_copy_handlers()
1897 ch->handlers->read->method = source->handlers->read->method; in _php_setup_easy_copy_handlers()
1898 ch->handlers->write_header->method = source->handlers->write_header->method; in _php_setup_easy_copy_handlers()
1899 if (!Z_ISUNDEF(source->handlers->write_header->stream)) { in _php_setup_easy_copy_handlers()
1900 Z_ADDREF(source->handlers->write_header->stream); in _php_setup_easy_copy_handlers()
1902 ch->handlers->write_header->stream = source->handlers->write_header->stream; in _php_setup_easy_copy_handlers()
1904 ch->handlers->write->fp = source->handlers->write->fp; in _php_setup_easy_copy_handlers()
1905 ch->handlers->write_header->fp = source->handlers->write_header->fp; in _php_setup_easy_copy_handlers()
1906 ch->handlers->read->fp = source->handlers->read->fp; in _php_setup_easy_copy_handlers()
1907 ch->handlers->read->res = source->handlers->read->res; in _php_setup_easy_copy_handlers()
1909 if (!Z_ISUNDEF(source->handlers->write->func_name)) { in _php_setup_easy_copy_handlers()
1910 ZVAL_COPY(&ch->handlers->write->func_name, &source->handlers->write->func_name); in _php_setup_easy_copy_handlers()
1912 if (!Z_ISUNDEF(source->handlers->read->func_name)) { in _php_setup_easy_copy_handlers()
1913 ZVAL_COPY(&ch->handlers->read->func_name, &source->handlers->read->func_name); in _php_setup_easy_copy_handlers()
1915 if (!Z_ISUNDEF(source->handlers->write_header->func_name)) { in _php_setup_easy_copy_handlers()
1916 ZVAL_COPY(&ch->handlers->write_header->func_name, &source->handlers->write_header->func_name); in _php_setup_easy_copy_handlers()
1925 if (source->handlers->progress) { in _php_setup_easy_copy_handlers()
1926 ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); in _php_setup_easy_copy_handlers()
1927 if (!Z_ISUNDEF(source->handlers->progress->func_name)) { in _php_setup_easy_copy_handlers()
1928 ZVAL_COPY(&ch->handlers->progress->func_name, &source->handlers->progress->func_name); in _php_setup_easy_copy_handlers()
1930 ch->handlers->progress->method = source->handlers->progress->method; in _php_setup_easy_copy_handlers()
1934 if (source->handlers->fnmatch) { in _php_setup_easy_copy_handlers()
1935 ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); in _php_setup_easy_copy_handlers()
1936 if (!Z_ISUNDEF(source->handlers->fnmatch->func_name)) { in _php_setup_easy_copy_handlers()
1937 ZVAL_COPY(&ch->handlers->fnmatch->func_name, &source->handlers->fnmatch->func_name); in _php_setup_easy_copy_handlers()
1939 ch->handlers->fnmatch->method = source->handlers->fnmatch->method; in _php_setup_easy_copy_handlers()
2549 if (!Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_setopt()
2550 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_setopt()
2551 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_setopt()
2553 ch->handlers->write->fp = NULL; in _php_curl_setopt()
2554 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_setopt()
2556 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_setopt()
2557 ch->handlers->write->fp = fp; in _php_curl_setopt()
2558 ch->handlers->write->method = PHP_CURL_FILE; in _php_curl_setopt()
2559 ZVAL_COPY(&ch->handlers->write->stream, zvalue); in _php_curl_setopt()
2567 if (!Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_setopt()
2568 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_setopt()
2569 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_setopt()
2571 ch->handlers->write_header->fp = NULL; in _php_curl_setopt()
2572 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_setopt()
2574 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_setopt()
2575 ch->handlers->write_header->fp = fp; in _php_curl_setopt()
2576 ch->handlers->write_header->method = PHP_CURL_FILE; in _php_curl_setopt()
2577 ZVAL_COPY(&ch->handlers->write_header->stream, zvalue); in _php_curl_setopt()
2585 if (!Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_setopt()
2586 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_setopt()
2587 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_setopt()
2589 ch->handlers->read->fp = NULL; in _php_curl_setopt()
2590 ch->handlers->read->res = NULL; in _php_curl_setopt()
2592 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_setopt()
2593 ch->handlers->read->fp = fp; in _php_curl_setopt()
2594 ch->handlers->read->res = Z_RES_P(zvalue); in _php_curl_setopt()
2595 ZVAL_COPY(&ch->handlers->read->stream, zvalue); in _php_curl_setopt()
2600 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_setopt()
2601 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_setopt()
2602 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_setopt()
2605 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_setopt()
2606 ZVAL_COPY(&ch->handlers->std_err, zvalue); in _php_curl_setopt()
2718 if (!Z_ISUNDEF(ch->handlers->write_header->func_name)) { in _php_curl_setopt()
2719 zval_ptr_dtor(&ch->handlers->write_header->func_name); in _php_curl_setopt()
2720 ch->handlers->write_header->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2722 ZVAL_COPY(&ch->handlers->write_header->func_name, zvalue); in _php_curl_setopt()
2723 ch->handlers->write_header->method = PHP_CURL_USER; in _php_curl_setopt()
2749 if (ch->handlers->progress == NULL) { in _php_curl_setopt()
2750 ch->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); in _php_curl_setopt()
2751 } else if (!Z_ISUNDEF(ch->handlers->progress->func_name)) { in _php_curl_setopt()
2752 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_setopt()
2753 ch->handlers->progress->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2755 ZVAL_COPY(&ch->handlers->progress->func_name, zvalue); in _php_curl_setopt()
2756 ch->handlers->progress->method = PHP_CURL_USER; in _php_curl_setopt()
2760 if (!Z_ISUNDEF(ch->handlers->read->func_name)) { in _php_curl_setopt()
2761 zval_ptr_dtor(&ch->handlers->read->func_name); in _php_curl_setopt()
2762 ch->handlers->read->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2764 ZVAL_COPY(&ch->handlers->read->func_name, zvalue); in _php_curl_setopt()
2765 ch->handlers->read->method = PHP_CURL_USER; in _php_curl_setopt()
2770 ch->handlers->write->method = PHP_CURL_RETURN; in _php_curl_setopt()
2772 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_setopt()
2777 if (!Z_ISUNDEF(ch->handlers->write->func_name)) { in _php_curl_setopt()
2778 zval_ptr_dtor(&ch->handlers->write->func_name); in _php_curl_setopt()
2779 ch->handlers->write->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2781 ZVAL_COPY(&ch->handlers->write->func_name, zvalue); in _php_curl_setopt()
2782 ch->handlers->write->method = PHP_CURL_USER; in _php_curl_setopt()
2858 if (ch->handlers->fnmatch == NULL) { in _php_curl_setopt()
2859 ch->handlers->fnmatch = ecalloc(1, sizeof(php_curl_fnmatch)); in _php_curl_setopt()
2860 } else if (!Z_ISUNDEF(ch->handlers->fnmatch->func_name)) { in _php_curl_setopt()
2861 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in _php_curl_setopt()
2862 ch->handlers->fnmatch->fci_cache = empty_fcall_info_cache; in _php_curl_setopt()
2864 ZVAL_COPY(&ch->handlers->fnmatch->func_name, zvalue); in _php_curl_setopt()
2865 ch->handlers->fnmatch->method = PHP_CURL_USER; in _php_curl_setopt()
2945 smart_str_free(&ch->handlers->write->buf); in _php_curl_cleanup_handle()
2977 smart_str_free(&ch->handlers->write->buf); in PHP_FUNCTION()
2981 if (!Z_ISUNDEF(ch->handlers->std_err)) { in PHP_FUNCTION()
2983 …stream = (php_stream*)zend_fetch_resource2_ex(&ch->handlers->std_err, NULL, php_file_le_stream(), … in PHP_FUNCTION()
2989 if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.s) { in PHP_FUNCTION()
2990 smart_str_0(&ch->handlers->write->buf); in PHP_FUNCTION()
2991 RETURN_STR_COPY(ch->handlers->write->buf.s); in PHP_FUNCTION()
2995 if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) { in PHP_FUNCTION()
2996 fflush(ch->handlers->write->fp); in PHP_FUNCTION()
2998 if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) { in PHP_FUNCTION()
2999 fflush(ch->handlers->write_header->fp); in PHP_FUNCTION()
3002 if (ch->handlers->write->method == PHP_CURL_RETURN) { in PHP_FUNCTION()
3362 smart_str_free(&ch->handlers->write->buf); in curl_free_obj()
3363 zval_ptr_dtor(&ch->handlers->write->func_name); in curl_free_obj()
3364 zval_ptr_dtor(&ch->handlers->read->func_name); in curl_free_obj()
3365 zval_ptr_dtor(&ch->handlers->write_header->func_name); in curl_free_obj()
3366 zval_ptr_dtor(&ch->handlers->std_err); in curl_free_obj()
3371 zval_ptr_dtor(&ch->handlers->write_header->stream); in curl_free_obj()
3372 zval_ptr_dtor(&ch->handlers->write->stream); in curl_free_obj()
3373 zval_ptr_dtor(&ch->handlers->read->stream); in curl_free_obj()
3375 efree(ch->handlers->write); in curl_free_obj()
3376 efree(ch->handlers->write_header); in curl_free_obj()
3377 efree(ch->handlers->read); in curl_free_obj()
3379 if (ch->handlers->progress) { in curl_free_obj()
3380 zval_ptr_dtor(&ch->handlers->progress->func_name); in curl_free_obj()
3381 efree(ch->handlers->progress); in curl_free_obj()
3384 if (ch->handlers->fnmatch) { in curl_free_obj()
3385 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in curl_free_obj()
3386 efree(ch->handlers->fnmatch); in curl_free_obj()
3389 efree(ch->handlers); in curl_free_obj()
3423 if (!Z_ISUNDEF(ch->handlers->write->stream)) { in _php_curl_reset_handlers()
3424 zval_ptr_dtor(&ch->handlers->write->stream); in _php_curl_reset_handlers()
3425 ZVAL_UNDEF(&ch->handlers->write->stream); in _php_curl_reset_handlers()
3427 ch->handlers->write->fp = NULL; in _php_curl_reset_handlers()
3428 ch->handlers->write->method = PHP_CURL_STDOUT; in _php_curl_reset_handlers()
3430 if (!Z_ISUNDEF(ch->handlers->write_header->stream)) { in _php_curl_reset_handlers()
3431 zval_ptr_dtor(&ch->handlers->write_header->stream); in _php_curl_reset_handlers()
3432 ZVAL_UNDEF(&ch->handlers->write_header->stream); in _php_curl_reset_handlers()
3434 ch->handlers->write_header->fp = NULL; in _php_curl_reset_handlers()
3435 ch->handlers->write_header->method = PHP_CURL_IGNORE; in _php_curl_reset_handlers()
3437 if (!Z_ISUNDEF(ch->handlers->read->stream)) { in _php_curl_reset_handlers()
3438 zval_ptr_dtor(&ch->handlers->read->stream); in _php_curl_reset_handlers()
3439 ZVAL_UNDEF(&ch->handlers->read->stream); in _php_curl_reset_handlers()
3441 ch->handlers->read->fp = NULL; in _php_curl_reset_handlers()
3442 ch->handlers->read->res = NULL; in _php_curl_reset_handlers()
3443 ch->handlers->read->method = PHP_CURL_DIRECT; in _php_curl_reset_handlers()
3445 if (!Z_ISUNDEF(ch->handlers->std_err)) { in _php_curl_reset_handlers()
3446 zval_ptr_dtor(&ch->handlers->std_err); in _php_curl_reset_handlers()
3447 ZVAL_UNDEF(&ch->handlers->std_err); in _php_curl_reset_handlers()
3450 if (ch->handlers->progress) { in _php_curl_reset_handlers()
3451 zval_ptr_dtor(&ch->handlers->progress->func_name); in _php_curl_reset_handlers()
3452 efree(ch->handlers->progress); in _php_curl_reset_handlers()
3453 ch->handlers->progress = NULL; in _php_curl_reset_handlers()
3456 if (ch->handlers->fnmatch) { in _php_curl_reset_handlers()
3457 zval_ptr_dtor(&ch->handlers->fnmatch->func_name); in _php_curl_reset_handlers()
3458 efree(ch->handlers->fnmatch); in _php_curl_reset_handlers()
3459 ch->handlers->fnmatch = NULL; in _php_curl_reset_handlers()