cvs: php4 /ext/sockets sockets.c

From: Date: Wed, 05 Sep 2001 15:30:40 +0000
Subject: cvs: php4 /ext/sockets sockets.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7219@lists.php.net to get a copy of this message
jason Wed Sep 5 11:30:40 2001 EDT Modified files: /php4/ext/sockets sockets.c Log: Prevent incorrect warning message from occuring on an EOF of socket_read. Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.63 php4/ext/sockets/sockets.c:1.64 --- php4/ext/sockets/sockets.c:1.63 Tue Sep 4 18:27:30 2001 +++ php4/ext/sockets/sockets.c Wed Sep 5 11:30:34 2001 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.63 2001/09/04 22:27:30 jason Exp $ */ +/* $Id: sockets.c,v 1.64 2001/09/05 15:30:34 jason Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -785,8 +785,11 @@ #endif if (retval <= 0) { - php_error(E_WARNING, "Couldn't read %d bytes from socket %d [%d]: %s", - Z_LVAL_PP(arg2), php_sock->bsd_socket, errno, strerror(errno)); + if (retval != 0) { + /* Not EOF */ + php_error(E_WARNING, "Couldn't read %d bytes from socket %d [%d]: %s", + Z_LVAL_PP(arg2), php_sock->bsd_socket, errno, strerror(errno)); + } efree(tmpbuf); RETURN_FALSE; }

« previous php.cvs (#7219) next »