@@ -147,12 +147,13 @@ usage(char *program)
147147 printf (" --loglevel <number> Log level (0-5)\n" );
148148 printf (" --logfile <filename> Log filename. Not supplying this argument will result in logging to stderr only.\n" );
149149 printf (" --logdomains <dom,dom..> Log domains\n" );
150- printf (" --config <file> Use <file> as the configuration file\n" );
150+ printf (" --config <file> Use <file> for the configuration file. \n" );
151151 printf (" --name <name> Name of the airplay 2 device. Mandatory in absence of --ntpstart.\n" );
152152 printf (" --hostname <hostname> Hostname of AirPlay 2 device. Mandatory in absence of --ntpstart.\n" );
153153 printf (" --address <address> IP address to bind to for AirPlay 2 service. Mandatory in absence of --ntpstart.\n" );
154154 printf (" --port <port> Port number to bind to for AirPlay 2 service. Mandatory in absence of --ntpstart.\n" );
155155 printf (" --txt <txt> txt keyvals returned in mDNS for AirPlay 2 service. Mandatory in absence of --ntpstart.\n" );
156+ printf (" --auth <auth_key> Authorization key.\n" );
156157 printf (" --pipe <audio_filename> filename of named pipe to read streamed audio. Mandatory in absence of --ntpstart.\n" );
157158 printf (" --command_pipe <command_filename> filename of named pipe to read commands and metadata. Defaults to <audio_filename>.metadata\n" );
158159 printf (" --ntp Print current NTP time and exit.\n" );
@@ -524,6 +525,7 @@ main(int argc, char **argv)
524525 { "testrun" , 0 , NULL , 514 }, // Used for CI, not documented to user
525526 { "pipe" , 1 , NULL , 515 },
526527 { "command_pipe" , 1 , NULL , 517 },
528+ { "auth" , 1 , NULL , 518 },
527529
528530 { NULL , 0 , NULL , 0 }
529531 };
@@ -629,6 +631,10 @@ main(int argc, char **argv)
629631 mass_named_pipes .metadata_pipe = optarg ;
630632 break ;
631633
634+ case 518 : // authorization key
635+ ap2_device_info .auth_key = optarg ;
636+ break ;
637+
632638 default :
633639 case '?' :
634640 usage (argv [0 ]);
@@ -683,7 +689,6 @@ main(int argc, char **argv)
683689 conffile_unload ();
684690 return EXIT_FAILURE ;
685691 }
686- // logger_detach(); // Eliminate logging to stderr
687692
688693 if (testrun ) {
689694 ret = create_pipes (TESTRUN_PIPE );
@@ -694,7 +699,7 @@ main(int argc, char **argv)
694699 mass_named_pipes .audio_pipe = TESTRUN_PIPE ;
695700 }
696701 else {
697- // Check that named pipe exists for audio streaming. Metadata one too?
702+ // Check that named pipes exist for audio streaming and metadata
698703 ret = check_pipe (mass_named_pipes .audio_pipe );
699704 if (ret < 0 ) {
700705 return EXIT_FAILURE ;
0 commit comments