[vlc-devel] commit: Allow 0 TTL (Sebastien Escudier )

git version control git at videolan.org
Fri Sep 19 16:47:56 CEST 2008


vlc | branch: master | Sebastien Escudier <sebastien-devel at celeos.eu> | Fri Sep 19 15:48:05 2008 +0200| [c46a622afa1e173f422b3841070cd952dfb4e21f] | committer: Rémi Denis-Courmont 

Allow 0 TTL

Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>

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

 modules/control/netsync.c       |    2 +-
 modules/demux/ts.c              |    2 +-
 modules/misc/notify/growl_udp.c |    2 +-
 src/network/udp.c               |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/control/netsync.c b/modules/control/netsync.c
index 11f59c7..3b4b7bc 100644
--- a/modules/control/netsync.c
+++ b/modules/control/netsync.c
@@ -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
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 05484ec..5eba00e 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -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" );
diff --git a/modules/misc/notify/growl_udp.c b/modules/misc/notify/growl_udp.c
index 17ec991..d23f717 100644
--- a/modules/misc/notify/growl_udp.c
+++ b/modules/misc/notify/growl_udp.c
@@ -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)" );
diff --git a/src/network/udp.c b/src/network/udp.c
index 8f6a18f..f063e2f 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -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");




More information about the vlc-devel mailing list