[vlc-devel] commit: Fixed an incorrect read() error handling (http access). ( Laurent Aimar )
git version control
git at videolan.org
Mon Apr 13 21:31:40 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Apr 13 21:24:05 2009 +0200| [fb79b01e7bcea0876b2e62da67e9ca12b5458349] | committer: Laurent Aimar
Fixed an incorrect read() error handling (http access).
It was based on xxcv investigation and preliminary patch.
It should fix #2644.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb79b01e7bcea0876b2e62da67e9ca12b5458349
---
modules/access/http.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 0304f2d..e10114f 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -750,7 +750,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
}
}
}
- else if( i_read == 0 )
+ else if( i_read <= 0 )
{
/*
* I very much doubt that this will work.
@@ -781,7 +781,10 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
}
}
- if( i_read == 0 ) p_access->info.b_eof = true;
+ if( i_read == 0 )
+ p_access->info.b_eof = true;
+ else if( i_read < 0 )
+ p_access->b_error = true;
}
if( p_access->info.i_size != -1 )
More information about the vlc-devel
mailing list