X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client.c;h=05414b5dcd8295fb8e9abe83349bdf5e0b451107;hp=f1b1fc537acd0e9cb7e84445dc28939021dfa3f8;hb=0fa2672890a4fe58c3418670e57a511b3ea7189c;hpb=ee21a57095f838337945bd3d2e19bd20bdfee3ea diff --git a/src/php_http_client.c b/src/php_http_client.c index f1b1fc5..05414b5 100644 --- a/src/php_http_client.c +++ b/src/php_http_client.c @@ -435,7 +435,9 @@ static ZEND_RESULT_CODE handle_response(void *arg, php_http_client_t *client, ph zend_fcall_info_argn(&e->closure.fci TSRMLS_CC, 1, &zresponse); zend_replace_error_handling(EH_NORMAL, NULL, &zeh TSRMLS_CC); + ++client->callback.depth; zend_fcall_info_call(&e->closure.fci, &e->closure.fcc, &retval, NULL TSRMLS_CC); + --client->callback.depth; zend_restore_error_handling(&zeh TSRMLS_CC); zend_fcall_info_argn(&e->closure.fci TSRMLS_CC, 0); @@ -490,7 +492,9 @@ static void handle_progress(void *arg, php_http_client_t *client, php_http_clien args[1] = &zprogress; zend_replace_error_handling(EH_NORMAL, NULL, &zeh TSRMLS_CC); + ++client->callback.depth; php_http_object_method_call(&client_obj->notify, zclient, NULL, 2, args TSRMLS_CC); + --client->callback.depth; zend_restore_error_handling(&zeh TSRMLS_CC); zval_ptr_dtor(&zclient); @@ -516,7 +520,9 @@ static void handle_debug(void *arg, php_http_client_t *client, php_http_client_e zend_replace_error_handling(EH_NORMAL, NULL, &zeh TSRMLS_CC); if (SUCCESS == zend_fcall_info_argn(&client_obj->debug.fci TSRMLS_CC, 4, &zclient, &zreq, &ztype, &zdata)) { + ++client_obj->client->callback.depth; zend_fcall_info_call(&client_obj->debug.fci, &client_obj->debug.fcc, NULL, NULL TSRMLS_CC); + --client_obj->client->callback.depth; zend_fcall_info_args_clear(&client_obj->debug.fci, 0); } zend_restore_error_handling(&zeh TSRMLS_CC); @@ -525,7 +531,6 @@ static void handle_debug(void *arg, php_http_client_t *client, php_http_client_e zval_ptr_dtor(&zreq); zval_ptr_dtor(&ztype); zval_ptr_dtor(&zdata); - } static void response_dtor(void *data)