php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch ignore-warnings-for-nonblocking for Sockets related Bug #63570Patch version 2012-12-03 11:54 UTC Return to Bug #63570 | Download this patchThis patch renders other patches obsolete Obsolete patches:
Developer: osmanov@php.net--- sockets.c 2012-12-03 16:51:32.754390824 +0500 +++ /tmp/sockets.c 2012-12-03 16:51:24.089390445 +0500 @@ -118,9 +118,16 @@ #define PHP_NORMAL_READ 0x0001 #define PHP_BINARY_READ 0x0002 -#define PHP_SOCKET_ERROR(socket,msg,errn) socket->error = errn; \ - SOCKETS_G(last_error) = errn; \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s [%d]: %s", msg, errn, php_strerror(errn TSRMLS_CC)) +#define PHP_SOCKET_ERROR(socket,msg,errn) \ + do { \ + socket->error = errn; \ + SOCKETS_G(last_error) = errn; \ + if (! (socket->blocking == 0 \ + && (errn == EINPROGRESS || errn == EAGAIN || errn == EWOULDBLOCK))) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, \ + "%s [%d]: %s", msg, errn, php_strerror(errn TSRMLS_CC)); \ + } \ + while (0) static int le_socket; #define le_socket_name php_sockets_le_socket_name |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sun Dec 22 07:01:30 2024 UTC |