From f059f14c68078ff2cf68564c88694abb32e59c04 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Tue, 11 Oct 2022 23:35:41 +0100 Subject: [PATCH] raop: Allow digest authentication and auth-setup to be used together The current implementation assumes these are mutually exclusive, but Yamaha MusicCast requires an auth-setup step following the digest authentication. `rtsp_auth_reply` could be dropped in favour of `rtsp_options_reply`, but you may end up in a loop if the other end keeps responding with 401. --- src/modules/module-raop-sink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c index dfff77691..06df58a03 100644 --- a/src/modules/module-raop-sink.c +++ b/src/modules/module-raop-sink.c @@ -1168,7 +1168,10 @@ static void rtsp_auth_reply(void *data, int status, const struct spa_dict *heade switch (status) { case 200: - rtsp_do_announce(impl); + if (impl->encryption == CRYPTO_AUTH_SETUP) + rtsp_do_auth_setup(impl); + else + rtsp_do_announce(impl); break; } }