[vlc-devel] commit: HTTP access: privatize b_error ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Jan 28 20:20:03 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 28 21:11:23 2010 +0200| [d58211076fb937d2374ef4191ec1252004d86d1f] | committer: Rémi Denis-Courmont 

HTTP access: privatize b_error

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

 modules/access/http.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 384a58c..f052d24 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -156,6 +156,7 @@ vlc_module_end ()
 struct access_sys_t
 {
     int fd;
+    bool b_error;
     tls_session_t *p_tls;
     v_socket_t    *p_vs;
 
@@ -881,8 +882,8 @@ 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;
-        else if( i_read < 0 )
-            p_access->b_error = true;
+        if( i_read < 0 )
+            p_sys->b_error = true;
     }
 
     if( p_sys->b_has_size )
@@ -1202,7 +1203,7 @@ static int Connect( access_t *p_access, uint64_t i_tell )
 
                 free( psz );
 
-                if( !vlc_object_alive (p_access) || p_access->b_error )
+                if( !vlc_object_alive (p_access) || p_sys->b_error )
                 {
                     Disconnect( p_access );
                     return -1;
@@ -1387,7 +1388,7 @@ static int Request( access_t *p_access, uint64_t i_tell )
             goto error;
         }
 
-        if( !vlc_object_alive (p_access) || p_access->b_error )
+        if( !vlc_object_alive (p_access) || p_sys->b_error )
         {
             free( psz );
             goto error;




More information about the vlc-devel mailing list