X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_pool_api.c;h=282fda9ed2df25b2becac2c64ccd09e617642fb0;hp=1775293452eddf63cd526c8d23d60d248677370c;hb=c71fd3a3bcc7231f2efc4c7520888880f42a6b3c;hpb=b08947e98f1832091c8a9f6dea3799e0524d2822 diff --git a/http_request_pool_api.c b/http_request_pool_api.c index 1775293..282fda9 100644 --- a/http_request_pool_api.c +++ b/http_request_pool_api.c @@ -36,6 +36,10 @@ ZEND_EXTERN_MODULE_GLOBALS(http); +#ifndef HAVE_CURL_MULTI_STRERROR +# define curl_multi_strerror(dummy) "unknown error" +#endif + static void http_request_pool_freebody(http_request_body **body); static int http_request_pool_compare_handles(void *h1, void *h2); @@ -182,7 +186,11 @@ PHP_HTTP_API STATUS _http_request_pool_send(http_request_pool *pool TSRMLS_DC) fprintf(stderr, "> %d unfinished requests of pool %p remaining\n", pool->unfinished, pool); #endif if (SUCCESS != http_request_pool_select(pool)) { - http_error(HE_WARNING, HTTP_E_SOCKET, "Socket error"); +#ifdef PHP_WIN32 + http_error(HE_WARNING, HTTP_E_SOCKET, WSAGetLastError()); +#else + http_error(HE_WARNING, HTTP_E_SOCKET, strerror(errno)); +#endif return FAILURE; } }