]> git.sesse.net Git - vlc/commitdiff
MMSH: use var_Inherit
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 18:22:51 +0000 (20:22 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 30 Dec 2009 18:39:34 +0000 (20:39 +0200)
modules/access/mms/mmsh.c

index ec0d3e46d99c3ca29f6ed44fcf00fc80005db9cb..d6551ab6003b547f9b423503a125ce18cbb5738c 100644 (file)
@@ -90,23 +90,18 @@ int MMSHOpen( access_t *p_access )
 
     /* Check proxy */
     /* TODO reuse instead http-proxy from http access ? */
-    psz_proxy = var_CreateGetString( p_access, "mmsh-proxy" );
-    if( !*psz_proxy )
+    psz_proxy = var_CreateGetNonEmptyString( p_access, "mmsh-proxy" );
+    if( !psz_proxy )
     {
-        char *psz_http_proxy = config_GetPsz( p_access, "http-proxy" );
-        if( psz_http_proxy && *psz_http_proxy )
+        char *psz_http_proxy = var_InheritString( p_access, "http-proxy" );
+        if( psz_http_proxy )
         {
-            free( psz_proxy );
             psz_proxy = psz_http_proxy;
             var_SetString( p_access, "mmsh-proxy", psz_proxy );
         }
-        else
-        {
-            free( psz_http_proxy );
-        }
     }
 
-    if( *psz_proxy )
+    if( psz_proxy )
     {
         p_sys->b_proxy = true;
         vlc_UrlParse( &p_sys->proxy, psz_proxy, 0 );