diff options
| author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-11-04 17:05:17 +0000 |
|---|---|---|
| committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-11-04 17:05:17 +0000 |
| commit | 2e32876eaadde2f96294d62f7905b03043fa729c (patch) | |
| tree | a2fb9a2b945aae103cb019e92c1f17361a51f8c9 /main/streams/streams.c | |
| parent | 0bb5310a63535a52ebf5ffdfa3ec6229f802fbc3 (diff) | |
| download | php-git-2e32876eaadde2f96294d62f7905b03043fa729c.tar.gz | |
Fixed stream_get_line() to behave as documented on non-blocking streams
Diffstat (limited to 'main/streams/streams.c')
| -rwxr-xr-x | main/streams/streams.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 15b3994788..6f9a4eef1b 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1136,6 +1136,9 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re } if (!e) { + if (seek_len < maxlen && !stream->eof) { + return NULL; + } toread = maxlen; } else { toread = e - stream->readbuf.s - stream->readpos; |
