]> git.sesse.net Git - vlc/commitdiff
- Use net_ConnectUDP on the slave side
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 5 Dec 2005 17:46:22 +0000 (17:46 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 5 Dec 2005 17:46:22 +0000 (17:46 +0000)
- Don't force a port on the slave side (that was not needed)

modules/control/netsync.c

index 16219cdfc68dfb4a2dd76ba23303b91dc5771113..f6064fa87b27fb955ad31afe180d6ce01ab4ccbd 100644 (file)
@@ -41,8 +41,7 @@
 
 #include "network.h"
 
-#define NETSYNC_PORT_MASTER 9875
-#define NETSYNC_PORT_SLAVE  9876
+#define NETSYNC_PORT 9875
 
 /* Needed for Solaris */
 #ifndef INADDR_NONE
@@ -144,10 +143,10 @@ static void Run( intf_thread_t *p_intf )
         }
     }
 
-    i_socket = net_OpenUDP( p_intf, NULL,
-                   b_master ? NETSYNC_PORT_MASTER : NETSYNC_PORT_SLAVE,
-                   b_master ? NULL : psz_master,
-                   b_master ? 0 : NETSYNC_PORT_MASTER );
+    if( b_master )
+        i_socket = net_OpenUDP( p_intf, NULL, NETSYNC_PORT, NULL, 0 );
+    else
+        i_socket = net_ConnectUDP( p_intf, psz_master, NETSYNC_PORT, 0 );
 
     if( psz_master ) free( psz_master );