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

Use OS default for multicast hop limit if not overriden by the user

parent 494933e1
...@@ -165,11 +165,7 @@ int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port, ...@@ -165,11 +165,7 @@ int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port,
i_port = 1234; /* historical VLC thing */ i_port = 1234; /* historical VLC thing */
if( i_hlim < 1 ) if( i_hlim < 1 )
{
i_hlim = var_CreateGetInteger( p_this, "ttl" ); i_hlim = var_CreateGetInteger( p_this, "ttl" );
if( i_hlim < 1 )
i_hlim = 1;
}
memset( &hints, 0, sizeof( hints ) ); memset( &hints, 0, sizeof( hints ) );
hints.ai_socktype = SOCK_DGRAM; hints.ai_socktype = SOCK_DGRAM;
...@@ -214,6 +210,7 @@ int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port, ...@@ -214,6 +210,7 @@ int __net_ConnectUDP( vlc_object_t *p_this, const char *psz_host, int i_port,
} }
#endif #endif
if( hlim > 0 )
net_SetMcastHopLimit( p_this, fd, ptr->ai_family, i_hlim ); net_SetMcastHopLimit( p_this, fd, ptr->ai_family, i_hlim );
psz_mif_addr = config_GetPsz( p_this, "miface-addr" ); psz_mif_addr = config_GetPsz( p_this, "miface-addr" );
if( psz_mif_addr != NULL ) if( psz_mif_addr != NULL )
......
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