cvs: php4 /main network.c

From: Date: Mon, 18 Mar 2002 20:13:50 +0000
Subject: cvs: php4 /main network.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10371@lists.php.net to get a copy of this message
wez Mon Mar 18 15:13:50 2002 EDT Modified files: /php4/main network.c Log: Fix for bug #10001: a timeout event prevents further reads. The Bug DB has a patch that should be applied to fsock.c on the 4.2 branch. Index: php4/main/network.c diff -u php4/main/network.c:1.40 php4/main/network.c:1.41 --- php4/main/network.c:1.40 Mon Mar 18 14:42:19 2002 +++ php4/main/network.c Mon Mar 18 15:13:50 2002 @@ -15,7 +15,7 @@ | Author: Stig Venaas <venaas@uninett.no> | +----------------------------------------------------------------------+ */ -/* $Id: network.c,v 1.40 2002/03/18 19:42:19 wez Exp $ */ +/* $Id: network.c,v 1.41 2002/03/18 20:13:50 wez Exp $ */ #define PHP_SOCK_CHUNK_SIZE 8192 #define MAX_CHUNKS_PER_READ 10 @@ -678,6 +678,7 @@ size_t ret = 0; if (sock->is_blocked) { + sock->timeout_event = 0; while(!sock->eof && TOREAD(sock) < count && !sock->timeout_event) php_sock_stream_read_internal(stream, sock TSRMLS_CC); } @@ -791,6 +792,8 @@ if(!p) { if(sock->is_blocked) { + sock->timeout_event = 0; + while(!p && !sock->eof && !sock->timeout_event && TOREAD(sock) < maxlen) { php_sock_stream_read_internal(stream, sock TSRMLS_CC); SEARCHCR();

« previous php.cvs (#10371) next »