[vlc-commits] http: simplify reconnect

Rémi Denis-Courmont git at videolan.org
Thu Dec 17 21:14:16 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec 17 22:13:59 2015 +0200| [934231ee820115e62e57a8491f38a7e6a6725055] | committer: Rémi Denis-Courmont

http: simplify reconnect

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

 modules/access/http.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index acea900..6f205b3 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -654,17 +654,9 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
         {
             msg_Dbg( p_access, "got disconnected, trying to reconnect" );
             if( Connect( p_access, p_sys->offset ) )
-            {
                 msg_Dbg( p_access, "reconnection failed" );
-            }
             else
-            {
-                p_sys->b_reconnect = false;
-                i_read = Read( p_access, p_buffer, i_len );
-                p_sys->b_reconnect = true;
-
-                return i_read;
-            }
+                return -1;
         }
 
         if( i_read <= 0 )



More information about the vlc-commits mailing list