Skip to content

raop: fix auth, reconnect, apple tv compat

Mohamed Akram requested to merge mohd-akram/pulseaudio:fix-raop into master

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 issue 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.

This likely closes several RAOP related issues.

Merge request reports