Commit c5695168 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

use var_Inherit

parent ab61a033
......@@ -137,11 +137,11 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
if( hints.ai_family == AF_UNSPEC )
{
#ifdef AF_INET6
if (var_CreateGetBool (p_this, "ipv6"))
if (var_InheritBool (p_this, "ipv6"))
hints.ai_family = AF_INET6;
else
#endif
if (var_CreateGetBool (p_this, "ipv4"))
if (var_InheritBool (p_this, "ipv4"))
hints.ai_family = AF_INET;
}
......
......@@ -112,7 +112,7 @@ int net_Socket (vlc_object_t *p_this, int family, int socktype,
#ifdef DCCP_SOCKOPT_SERVICE
if (socktype == SOL_DCCP)
{
char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service");
char *dccps = var_InheritString (p_this, "dccp-service");
if (dccps != NULL)
{
setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps,
......
......@@ -88,7 +88,7 @@ int net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
hints.ai_socktype = type;
hints.ai_protocol = proto;
psz_socks = var_CreateGetNonEmptyString( p_this, "socks" );
psz_socks = var_InheritString( p_this, "socks" );
if( psz_socks != NULL )
{
char *psz = strchr( psz_socks, ':' );
......@@ -224,8 +224,8 @@ next_ai: /* failure */
if( psz_socks != NULL )
{
/* NOTE: psz_socks already free'd! */
char *psz_user = var_CreateGetNonEmptyString( p_this, "socks-user" );
char *psz_pwd = var_CreateGetNonEmptyString( p_this, "socks-pwd" );
char *psz_user = var_InheritString( p_this, "socks-user" );
char *psz_pwd = var_InheritString( p_this, "socks-pwd" );
if( SocksHandshakeTCP( p_this, i_handle, 5, psz_user, psz_pwd,
psz_host, i_port ) )
......
......@@ -356,7 +356,7 @@ net_IPv4Join (vlc_object_t *obj, int fd,
socklen_t optlen;
/* Multicast interface IPv4 address */
char *iface = var_CreateGetNonEmptyString (obj, "miface-addr");
char *iface = var_InheritString (obj, "miface-addr");
if ((iface != NULL)
&& (inet_pton (AF_INET, iface, &id) <= 0))
{
......@@ -459,7 +459,7 @@ net_SourceSubscribe (vlc_object_t *obj, int fd,
{
int level, iid = 0;
char *iface = var_CreateGetNonEmptyString (obj, "miface");
char *iface = var_InheritString (obj, "miface");
if (iface != NULL)
{
iid = if_nametoindex (iface);
......@@ -649,7 +649,7 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
bool b_unreach = false;
if( i_hlim < 0 )
i_hlim = var_CreateGetInteger( p_this, "ttl" );
i_hlim = var_InheritInteger( p_this, "ttl" );
memset( &hints, 0, sizeof( hints ) );
hints.ai_socktype = SOCK_DGRAM;
......@@ -684,21 +684,21 @@ int net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
if( i_hlim >= 0 )
net_SetMcastHopLimit( p_this, fd, ptr->ai_family, i_hlim );
str = var_CreateGetNonEmptyString (p_this, "miface");
str = var_InheritString (p_this, "miface");
if (str != NULL)
{
net_SetMcastOut (p_this, fd, ptr->ai_family, str, NULL);
free (str);
}
str = var_CreateGetNonEmptyString (p_this, "miface-addr");
str = var_InheritString (p_this, "miface-addr");
if (str != NULL)
{
net_SetMcastOut (p_this, fd, ptr->ai_family, NULL, str);
free (str);
}
net_SetDSCP (fd, var_CreateGetInteger (p_this, "dscp"));
net_SetDSCP (fd, var_InheritInteger (p_this, "dscp"));
if( connect( fd, ptr->ai_addr, ptr->ai_addrlen ) == 0 )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment