From: Michael Wallner Date: Tue, 23 Aug 2016 11:46:50 +0000 (+0200) Subject: Merge branch 'v2.6.x' X-Git-Tag: RELEASE_3_1_0_BETA2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=06e6ed638087fb1f8ee2a5c950c7bd71d4b12eef;p=m6w6%2Fext-http Merge branch 'v2.6.x' --- 06e6ed638087fb1f8ee2a5c950c7bd71d4b12eef diff --cc src/php_http_client_curl.c index 9d41e29,b15fdd4..cf65353 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@@ -2276,20 -2249,23 +2276,22 @@@ static int php_http_client_curl_once(ph static ZEND_RESULT_CODE php_http_client_curl_exec(php_http_client_t *h) { php_http_client_curl_t *curl = h->ctx; - TSRMLS_FETCH_FROM_CTX(h->ts); - if (curl->ev_ops) { - return curl->ev_ops->exec(curl->ev_ctx); - } + if (!h->callback.depth) { + if (curl->ev_ops) { + return curl->ev_ops->exec(curl->ev_ctx); + } - while (php_http_client_curl_once(h) && !EG(exception)) { - if (SUCCESS != php_http_client_curl_wait(h, NULL)) { + while (php_http_client_curl_once(h) && !EG(exception)) { + if (SUCCESS != php_http_client_curl_wait(h, NULL)) { #ifdef PHP_WIN32 - /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */ - php_error_docref(NULL, E_WARNING, "WinSock error: %d", WSAGetLastError()); + /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "WinSock error: %d", WSAGetLastError()); ++ php_error_docref(NULL, E_WARNING, "WinSock error: %d", WSAGetLastError()); #else - php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); ++ php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); #endif - return FAILURE; + return FAILURE; + } } }