]> git.sesse.net Git - vlc/commitdiff
Disconnect before trying with authentication
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 29 Sep 2008 14:02:28 +0000 (17:02 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 29 Sep 2008 19:49:01 +0000 (22:49 +0300)
Disconnects http-connection before trying with authentication info.
This enables to use http-authentication sources without leaking fds

Kinda work-around

modules/access/http.c

index 98d33b669468e154212b39e37157e235bf4f2f57..ac0d6fc9db26f825eb52d1347374d0f00a955bea 100644 (file)
@@ -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