-
- 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;
- }
- }
-
- 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( psz_master ) free( psz_master );
-
- if( i_socket < 0 )
- {
- msg_Err( p_intf, "failed opening UDP socket." );
- return;
- }