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

- Use net_ConnectUDP on the slave side

- Don't force a port on the slave side (that was not needed)
parent 594dbde2
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#include "network.h" #include "network.h"
#define NETSYNC_PORT_MASTER 9875 #define NETSYNC_PORT 9875
#define NETSYNC_PORT_SLAVE 9876
/* Needed for Solaris */ /* Needed for Solaris */
#ifndef INADDR_NONE #ifndef INADDR_NONE
...@@ -144,10 +143,10 @@ static void Run( intf_thread_t *p_intf ) ...@@ -144,10 +143,10 @@ static void Run( intf_thread_t *p_intf )
} }
} }
i_socket = net_OpenUDP( p_intf, NULL, if( b_master )
b_master ? NETSYNC_PORT_MASTER : NETSYNC_PORT_SLAVE, i_socket = net_OpenUDP( p_intf, NULL, NETSYNC_PORT, NULL, 0 );
b_master ? NULL : psz_master, else
b_master ? 0 : NETSYNC_PORT_MASTER ); i_socket = net_ConnectUDP( p_intf, psz_master, NETSYNC_PORT, 0 );
if( psz_master ) free( psz_master ); if( psz_master ) free( psz_master );
......
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