vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Dec 16 
19:41:25 2015 +0200| [3daad56c16807bb24eac49feea69fe0b160a45c8] | committer: 
Rémi Denis-Courmont

http: fix handling of EINTR and EAGAIN

Those errors are not fatal and also do not imply end-of-stream.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3daad56c16807bb24eac49feea69fe0b160a45c8
---

 modules/access/http.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index bd4f5b5..387dd3d 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -648,7 +648,10 @@ static ssize_t Read( access_t *p_access, uint8_t 
*p_buffer, size_t i_len )
     if( ReadData( p_access, &i_read, p_buffer, i_len ) )
         goto fatal;
 
-    if( i_read <= 0 )
+    if( i_read < 0 )
+        return -1; /* EINTR / EAGAIN */
+
+    if( i_read == 0 )
     {
         /*
          * I very much doubt that this will work.

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to