[vlc-devel] commit: HTTP: sanity check ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 14 08:31:33 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Sep 13 22:48:00 2008 +0300| [62a433eb42e594e187b7d8911545dbab7648e34d] | committer: Rémi Denis-Courmont 

HTTP: sanity check

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

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

diff --git a/modules/access/http.c b/modules/access/http.c
index a45e1ca..2b883cc 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -640,7 +640,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
     access_sys_t *p_sys = p_access->p_sys;
     int i_read;
 
-    if( p_sys->fd < 0 )
+    if( p_sys->fd == -1 )
     {
         p_access->info.b_eof = true;
         return 0;
@@ -1019,8 +1019,8 @@ static int Connect( access_t *p_access, int64_t i_tell )
     p_access->info.i_pos  = i_tell;
     p_access->info.b_eof  = false;
 
-
     /* Open connection */
+    assert( p_sys->fd == -1 );
     p_sys->fd = net_ConnectTCP( p_access, srv.psz_host, srv.i_port );
     if( p_sys->fd == -1 )
     {




More information about the vlc-devel mailing list