Commit graph

1 commit

Author SHA1 Message Date
Mohamed Akram
31b6ecd507 raop: fix auth, reconnect, apple tv compat
The digest was not used in subsequent requests resulting in a 401 from
ANNOUNCE. This was changed so that the Authorization header is present
on all requests.

Reconnection did not handle the case where pa_rtsp_connect returned
immediately with a failure. This error was also not checked by
pa_raop_client_authenticate and pa_raop_client_announce, which caused
the raop client to be permanently stuck on failure as it assumed the
connection was ongoing. Similarly, a failure in SETUP was also not
reported and caused the client to be stuck. These issues were fixed and
conflicting disconnects/reconnects that caused crashes due to race
conditions were removed. We also avoid unloading the module due to a
failure since it might be recoverable. If a device is not accessible
anymore, the discover module will remove it.

Apple TV requires that the timing port is open and responding before
a SETUP response is provided, otherwise a 500 error is returned after
some time. This was added and the connection callback is called earlier
so that the sink loop can respond to timing requests in this phase. A
keep-alive request was also added as it is required by Apple TV to
prevent the stream from stopping.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/820>
2024-06-22 01:41:40 +04:00
Renamed from src/modules/raop/raop-util.h (Browse further)