]> git.sesse.net Git - vlc/commitdiff
Allow 0 TTL
authorSebastien Escudier <sebastien-devel@celeos.eu>
Fri, 19 Sep 2008 13:48:05 +0000 (15:48 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Fri, 19 Sep 2008 14:50:52 +0000 (17:50 +0300)
Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
modules/control/netsync.c
modules/demux/ts.c
modules/misc/notify/growl_udp.c
src/network/udp.c

index 11f59c792a4eff6dd9a7ff9b09015da83d6708bb..3b4b7bc3df53a14f3c66cab5360df6cd32598675 100644 (file)
@@ -108,7 +108,7 @@ static int Activate( vlc_object_t *p_this )
             msg_Err( p_intf, "master address not specified" );
             return VLC_EGENERIC;
         }
-        fd = net_ConnectUDP( VLC_OBJECT(p_intf), psz_master, NETSYNC_PORT, 0 );
+        fd = net_ConnectUDP( VLC_OBJECT(p_intf), psz_master, NETSYNC_PORT, -1 );
         free( psz_master );
     }
     else
index 05484eca02c21543e6d1fb9b6ba75e2e58f90359..5eba00ee25fe182115eeaa7c810093d675af9f4e 100644 (file)
@@ -712,7 +712,7 @@ static int Open( vlc_object_t *p_this )
         if( i_port <= 0 ) i_port  = 1234;
         msg_Dbg( p_demux, "resend ts to '%s:%d'", val.psz_string, i_port );
 
-        p_sys->fd = net_ConnectUDP( VLC_OBJECT(p_demux), val.psz_string, i_port, 0 );
+        p_sys->fd = net_ConnectUDP( VLC_OBJECT(p_demux), val.psz_string, i_port, -1 );
         if( p_sys->fd < 0 )
         {
             msg_Err( p_demux, "failed to open udp socket, send disabled" );
index 17ec991555a10684606aebe64cb05412870dfab3..d23f717ccaf994c62b2aad962eaa1e82de30069e 100644 (file)
@@ -289,7 +289,7 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
         p_data[i_offset++] = (md5.p_digest[i]>>24)&0xFF;
     }
 
-    i_handle = net_ConnectUDP( p_this, psz_server, i_port, 0 );
+    i_handle = net_ConnectUDP( p_this, psz_server, i_port, -1 );
     if( i_handle == -1 )
     {
          msg_Err( p_this, "failed to open a connection (udp)" );
index 8f6a18f499d88591a0e38ce8c78f815bda576f71..f063e2ffbbfd5a39b395117e87216ed9b0c24d15 100644 (file)
@@ -642,7 +642,7 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
     int             i_val, i_handle = -1;
     bool      b_unreach = false;
 
-    if( i_hlim < 1 )
+    if( i_hlim < 0 )
         i_hlim = var_CreateGetInteger( p_this, "ttl" );
 
     memset( &hints, 0, sizeof( hints ) );
@@ -676,7 +676,7 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
         setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &(int){ 1 }, sizeof (int));
 #endif
 
-        if( i_hlim > 0 )
+        if( i_hlim >= 0 )
             net_SetMcastHopLimit( p_this, fd, ptr->ai_family, i_hlim );
 
         str = var_CreateGetNonEmptyString (p_this, "miface");