[vlc-commits] commit: use var_Inherit ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Nov 10 17:41:55 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 10 18:41:38 2010 +0200| [c56951687d130b24a09ff26b6777ac88ce640846] | committer: Rémi Denis-Courmont 

use var_Inherit

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

 src/network/getaddrinfo.c |    4 ++--
 src/network/io.c          |    2 +-
 src/network/tcp.c         |    6 +++---
 src/network/udp.c         |   12 ++++++------
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index ff4f0fe..f63b64a 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -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;
     }
 
diff --git a/src/network/io.c b/src/network/io.c
index 2defe31..7280bc6 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -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,
diff --git a/src/network/tcp.c b/src/network/tcp.c
index 778a2d7..39973ff 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -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 ) )
diff --git a/src/network/udp.c b/src/network/udp.c
index 3d2ff82..1267db7 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -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 )
         {



More information about the vlc-commits mailing list