changeset 33720:0cb1d3b6539d

Pass streaming_ctrl eof on. Fixes a possible endless loop with HTTP files where seeking to the very end returns the full file again instead of e.g. an error. Apache/2.2.4 seems to show this behaviour.
author reimar
date Mon, 04 Jul 2011 19:14:06 +0000
parents 1a7ac6b2d447
children 1bb847d89fd5
files stream/stream.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream.c	Mon Jul 04 19:11:21 2011 +0000
+++ b/stream/stream.c	Mon Jul 04 19:14:06 2011 +0000
@@ -290,6 +290,8 @@
 #ifdef CONFIG_NETWORKING
     if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) {
       len=s->streaming_ctrl->streaming_read(s->fd, buf, len, s->streaming_ctrl);
+      if (s->streaming_ctrl->status == streaming_stopped_e)
+        s->eof = 1;
     } else
 #endif
     if (s->fill_buffer)