[vlc-commits] commit: HTTP access: use var_Inherit*() ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Sat May 29 17:45:57 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 29 18:40:55 2010 +0300| [002135d9e4de26b5ed725739b4ad7c03b7b5dda2] | committer: Rémi Denis-Courmont
HTTP access: use var_Inherit*()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=002135d9e4de26b5ed725739b4ad7c03b7b5dda2
---
modules/access/http.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 23dc4ec..8f5cfbc 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -247,7 +247,7 @@ static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
return OpenWithCookies( p_this, p_access->psz_access, 0,
- var_CreateGetInteger( p_access, "http-max-redirect" ), NULL );
+ var_InheritInteger( p_access, "http-max-redirect" ), NULL );
}
/**
@@ -269,7 +269,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
char *psz, *p;
/* Only forward an store cookies if the corresponding option is activated */
- bool b_forward_cookies = var_CreateGetBool( p_access, "http-forward-cookies" );
+ bool b_forward_cookies = var_InheritBool( p_access, "http-forward-cookies" );
vlc_array_t * saved_cookies = b_forward_cookies ? (cookies ? cookies : vlc_array_new()) : NULL;
/* Set up p_access */
@@ -345,10 +345,10 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
}
/* Do user agent */
- p_sys->psz_user_agent = var_CreateGetString( p_access, "http-user-agent" );
+ p_sys->psz_user_agent = var_InheritString( p_access, "http-user-agent" );
/* Check proxy */
- psz = var_CreateGetNonEmptyString( p_access, "http-proxy" );
+ psz = var_InheritString( p_access, "http-proxy" );
if( psz )
{
p_sys->b_proxy = true;
@@ -391,7 +391,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
#elif defined( WIN32 )
else
{
- if( var_CreateGetBool( p_access, "http-use-IE-proxy" ) )
+ if( var_InheritBool( p_access, "http-use-IE-proxy" ) )
{
/* Try to get the proxy server address from Windows internet settings using registry. */
HKEY h_key;
@@ -463,7 +463,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
if( psz ) /* No, this is NOT a use-after-free error */
{
- psz = var_CreateGetNonEmptyString( p_access, "http-proxy-pwd" );
+ psz = var_InheritString( p_access, "http-proxy-pwd" );
if( psz )
p_sys->proxy.psz_password = p_sys->psz_proxy_passbuf = psz;
}
@@ -494,8 +494,8 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
msg_Dbg( p_access, " user='%s'", p_sys->url.psz_username );
}
- p_sys->b_reconnect = var_CreateGetBool( p_access, "http-reconnect" );
- p_sys->b_continuous = var_CreateGetBool( p_access, "http-continuous" );
+ p_sys->b_reconnect = var_InheritBool( p_access, "http-reconnect" );
+ p_sys->b_continuous = var_InheritBool( p_access, "http-continuous" );
connect:
/* Connect */
More information about the vlc-commits
mailing list