[vlc-devel] commit: Disconnect before trying with authentication (Ilkka Ollakka )

git version control git at videolan.org
Mon Sep 29 21:45:32 CEST 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Sep 29 17:02:28 2008 +0300| [2bf3bbdbad6e9bc9352562b997082bfb90cba6fb] | committer: Ilkka Ollakka 

Disconnect before trying with authentication

Disconnects http-connection before trying with authentication info.
This enables to use http-authentication sources without leaking fds

Kinda work-around

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

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

diff --git a/modules/access/http.c b/modules/access/http.c
index 98d33b6..ac0d6fc 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -440,6 +440,7 @@ connect:
         if( p_sys->url.psz_username && p_sys->url.psz_password &&
             p_sys->auth.psz_nonce && p_sys->auth.i_nonce == 0 )
         {
+            Disconnect( p_access );
             goto connect;
         }
         snprintf( psz_msg, 250,
@@ -457,6 +458,7 @@ connect:
             if( psz_password ) p_sys->url.psz_password = strdup( psz_password );
             free( psz_login );
             free( psz_password );
+            Disconnect( p_access );
             goto connect;
         }
         else




More information about the vlc-devel mailing list