cvs: /php3/functions fsock.c

From: Date: Wed, 21 Jul 1999 15:45:41 +0000
Subject: cvs: /php3/functions fsock.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-8902@lists.php.net to get a copy of this message
sas Wed Jul 21 11:45:41 1999 EDT Modified files: /php3/functions fsock.c Log: Avoid staling in the case that the eof has not arrived yet and our receive queue is empty and the socket read queue is empty. The semantics for all other cases remains. Index: php3/functions/fsock.c diff -u php3/functions/fsock.c:1.132 php3/functions/fsock.c:1.133 --- php3/functions/fsock.c:1.132 Tue Jul 13 13:46:46 1999 +++ php3/functions/fsock.c Wed Jul 21 11:45:10 1999 @@ -27,7 +27,7 @@ | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.132 1999/07/13 17:46:46 sas Exp $ */ +/* $Id: fsock.c,v 1.133 1999/07/21 15:45:10 sas Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -661,15 +661,14 @@ return ret; } -/* - * XXX: With blocking sockets, this blocks until data arrives, if - * TOREAD(sock) == 0 - */ - int _php3_sock_feof(int socket) { int ret = 0; - SOCK_FIND_AND_READ_MAX(1); + SOCK_FIND(sock, socket); + + if(!sock->is_blocked) { + _php3_sock_read(sock); + } if(!TOREAD(sock) && sock->eof) ret = 1;

« previous php.dev (#8902) next »