version 1.12, 2015/11/18 08:36:20 |
version 1.13, 2015/11/22 16:52:06 |
|
|
{ |
{ |
int c, background, unit; |
int c, background, unit; |
int pmin, pmax, rmin, rmax; |
int pmin, pmax, rmin, rmax; |
char base[SOCKPATH_MAX], path[SOCKPATH_MAX]; |
char base[SOCKPATH_MAX], path[SOCKPATH_MAX], *tcpaddr; |
unsigned int mode, dup, mmc, vol; |
unsigned int mode, dup, mmc, vol; |
unsigned int hold, autovol, bufsz, round, rate; |
unsigned int hold, autovol, bufsz, round, rate; |
const char *str; |
const char *str; |
|
|
rmax = 1; |
rmax = 1; |
aparams_init(&par); |
aparams_init(&par); |
mode = MODE_PLAY | MODE_REC; |
mode = MODE_PLAY | MODE_REC; |
|
tcpaddr = NULL; |
|
|
setsig(); |
setsig(); |
filelist_init(); |
filelist_init(); |
|
|
errx(1, "%s: unit number is %s", optarg, str); |
errx(1, "%s: unit number is %s", optarg, str); |
break; |
break; |
case 'L': |
case 'L': |
#ifdef USE_TCP |
tcpaddr = optarg; |
listen_new_tcp(optarg, AUCAT_PORT + unit); |
|
#else |
|
errx(1, "-L option disabled at compilation time"); |
|
#endif |
|
break; |
break; |
case 'm': |
case 'm': |
mode = opt_mode(); |
mode = opt_mode(); |
|
|
getbasepath(base, sizeof(base)); |
getbasepath(base, sizeof(base)); |
snprintf(path, SOCKPATH_MAX, "%s/" SOCKPATH_FILE "%u", base, unit); |
snprintf(path, SOCKPATH_MAX, "%s/" SOCKPATH_FILE "%u", base, unit); |
listen_new_un(path); |
listen_new_un(path); |
|
if (tcpaddr) { |
|
#ifdef USE_TCP |
|
listen_new_tcp(optarg, AUCAT_PORT + unit); |
|
#else |
|
errx(1, "-L option disabled at compilation time"); |
|
#endif |
|
} |
if (geteuid() == 0) |
if (geteuid() == 0) |
privdrop(); |
privdrop(); |
midi_init(); |
midi_init(); |