php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch ignore-EINPROGRESS-warning for Sockets related Bug #63570

Patch version 2012-11-28 12:33 UTC

Return to Bug #63570 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: osmanov@php.net

--- sockets.c	2012-11-28 01:39:22.000000000 +0500
+++ /tmp/sockets.c	2012-11-28 17:29:47.765882716 +0500
@@ -118,9 +118,15 @@
 #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 (errn != EINPROGRESS) { \
+			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
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 19 15:01:23 2021 UTC