mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-15 00:34:05 +09:00
cleaned up -nohold feature + rejection of new connections when in use
(for compatibility with possible future video streaming additions)
This commit is contained in:
@@ -121,7 +121,7 @@ static unsigned short display[5] = {0}, tcp[3] = {0}, udp[3] = {0};
|
||||
static bool debug_log = DEFAULT_DEBUG_LOG;
|
||||
static int log_level = LOGGER_INFO;
|
||||
static bool bt709_fix = false;
|
||||
static int max_connections = 2;
|
||||
static int nohold = 0;
|
||||
static unsigned short raop_port;
|
||||
static unsigned short airplay_port;
|
||||
static uint64_t remote_clock_offset = 0;
|
||||
@@ -1033,7 +1033,7 @@ static void parse_arguments (int argc, char *argv[]) {
|
||||
} else if (arg == "-bt709") {
|
||||
bt709_fix = true;
|
||||
} else if (arg == "-nohold") {
|
||||
max_connections = 3;
|
||||
nohold = 1;
|
||||
} else if (arg == "-al") {
|
||||
int n;
|
||||
char *end;
|
||||
@@ -1825,8 +1825,8 @@ static int start_raop_server (unsigned short display[5], unsigned short tcp[3],
|
||||
}
|
||||
raop_set_log_callback(raop, log_callback, NULL);
|
||||
raop_set_log_level(raop, log_level);
|
||||
/* set max number of connections = 2 to protect against capture by new client */
|
||||
if (raop_init2(raop, max_connections, mac_address.c_str(), keyfile.c_str())){
|
||||
/* set nohold = 1 to allow capture by new client */
|
||||
if (raop_init2(raop, nohold, mac_address.c_str(), keyfile.c_str())){
|
||||
LOGE("Error initializing raop (2)!");
|
||||
free (raop);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user