-
- if( !b_master )
- {
- psz_master = config_GetPsz( p_intf, "netsync-master-ip" );
- if( psz_master == NULL )
- {
- msg_Err( p_intf, "master address not specified" );
- return;
- }
- }
-
- 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 );
-
- if( i_socket < 0 )
- {
- msg_Err( p_intf, "failed opening UDP socket." );
- return;
- }