]> git.ipfire.org Git - thirdparty/shairport-sync.git/log
thirdparty/shairport-sync.git
17 months agoAdd configure option to enable/disable creation of user/group 1820/head
Hugo Villeneuve [Thu, 7 Mar 2024 04:37:37 +0000 (23:37 -0500)] 
Add configure option to enable/disable creation of user/group

Useful for Yocto, for example, where groupadd or getenv is not available.

Enabled by default, to keep same behavior as before.

17 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 4 Mar 2024 11:18:39 +0000 (11:18 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

17 months agoBuild scripts/shairport-sync.service, scripts/shairport-sync.service-avahi and script...
Mike Brady [Mon, 4 Mar 2024 11:13:56 +0000 (11:13 +0000)] 
Build scripts/shairport-sync.service, scripts/shairport-sync.service-avahi and scripts/shairport-sync unconditionally for Linux to facilitate different installation methods.

17 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Sun, 25 Feb 2024 17:38:37 +0000 (17:38 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

17 months agoMerge pull request #1811 from klemensn/keep-password-private
Mike Brady [Sun, 25 Feb 2024 17:24:43 +0000 (17:24 +0000)] 
Merge pull request #1811 from klemensn/keep-password-private

Omit password in debug (syslog) output

17 months agoMerge pull request #1810 from klemensn/printf-null-string
Mike Brady [Sun, 25 Feb 2024 17:23:59 +0000 (17:23 +0000)] 
Merge pull request #1810 from klemensn/printf-null-string

Avoid passing NULL pointer to printf(3) %s

17 months agoMerge pull request #1803 from klemensn/initial-pledge
Mike Brady [Sun, 25 Feb 2024 17:14:29 +0000 (17:14 +0000)] 
Merge pull request #1803 from klemensn/initial-pledge

initial pledge(2) on OpenBSD

17 months agoOmit password in debug (syslog) output 1811/head
Klemens Nanni [Sat, 24 Feb 2024 13:41:02 +0000 (14:41 +0100)] 
Omit password in debug (syslog) output

Configuration files may contain it, but those can be protected with
filesystem permissions.

Debug log, however, may end up in syslog(3) which is usually accessible
by all users on a system.

Avoid disclosing user secrets by simply not printing the password.

17 months agoAvoid passing NULL pointer to printf(3) %s 1810/head
Klemens Nanni [Sat, 24 Feb 2024 13:12:25 +0000 (14:12 +0100)] 
Avoid passing NULL pointer to printf(3) %s

OpenBSD issues syslog(3) warnings about these as they may hint at bugs:
shairport-sync: vfprintf %s NULL in "metadata socket address is "%s" port %d."

Metadata listener socket is empty by default so use the existing `strnull`.

17 months agoinitial pledge(2) on OpenBSD 1803/head
Klemens Nanni [Mon, 12 Feb 2024 11:23:46 +0000 (12:23 +0100)] 
initial pledge(2) on OpenBSD

Limit the set of system calls shairport-sync is allowed to make,
most importantly fork(2)/execve(2) if and only if user defined commands
are run.

OpenBSD's official audio/shairport-sync port already ships with this
patch.

https://man.openbsd.org/pledge.2

17 months agoMerge pull request #1800 from klemensn/rtsp-listener-exit-segfault
Mike Brady [Tue, 6 Feb 2024 10:04:33 +0000 (10:04 +0000)] 
Merge pull request #1800 from klemensn/rtsp-listener-exit-segfault

Fix crash on double pthread_cancel(3) on exit (detected on OpenBSD).

18 months agoFix crash on double pthread_cancel(3) on exit 1800/head
Klemens Nanni [Wed, 31 Jan 2024 04:01:55 +0000 (05:01 +0100)] 
Fix crash on double pthread_cancel(3) on exit

On OpenBSD 7.4-current, failure to listen on the RTSP socket(s) results
the `rtsp_listener_thread` being pthread_cancel(3)'ed twice, once through
`rtsp_listen_loop()` and again via atexit(3) handler `exit_rtsp_listener()`:

```
$ nc -4l 5000 &
$ nc -6l 5000 &
$ shairport-sync -c/dev/null
warning: could not establish a service on port 5000 -- program terminating. Is another instance of Shairport Sync running on this device?
Segmentation fault (core dumped)
```
```
Program terminated with signal SIGSEGV, Segmentation fault.
433             if (tib->tib_canceled == 0 && tid != 0 &&
[Current thread is 1 (process 290061)]
```

`die()` -> `exit(EXIT_FAILURE)` normally in this case, thus forgoing the
first cancel and relying on the atexit handler alone.

With Mike Brady.

18 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Tue, 30 Jan 2024 16:17:06 +0000 (16:17 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

18 months agoMerge pull request #1797 from klemensn/openbsd-doc-nits
Mike Brady [Tue, 30 Jan 2024 15:56:00 +0000 (15:56 +0000)] 
Merge pull request #1797 from klemensn/openbsd-doc-nits

OpenBSD doc nits

18 months agoMerge pull request #1798 from klemensn/config-perm-segfault
Mike Brady [Tue, 30 Jan 2024 14:05:48 +0000 (14:05 +0000)] 
Merge pull request #1798 from klemensn/config-perm-segfault

Exit on config read error to avoid crash on EACCES

18 months agoExit on config read error to avoid crash on EACCES 1798/head
Klemens Nanni [Tue, 30 Jan 2024 02:43:44 +0000 (03:43 +0100)] 
Exit on config read error to avoid crash on EACCES

Failure to read does not exit despite
`    /* Read the file. If there is an error, report it and exit. */`

EACCES (e.g. insufficient filesystem permissions) is enough to crash
on access through later `config_*()` such as those when either of
either of D-Bus, MPRIS or MQTT is used.

Seen `--with-mpris-interface` and
```
$ ls -l /etc/shairport-sync.conf
-rw-r-----  1 root  _shairport  28114 Jan 25 01:53 /etc/shairport-sync.conf
$ shairport-sync
Segmentation fault (core dumped)
```

18 months agoclarify root privilege requirements 1797/head
Klemens Nanni [Tue, 30 Jan 2024 02:14:52 +0000 (03:14 +0100)] 
clarify root privilege requirements

NQPTP works and runs as _shairport user on OpenBSD.

Linux capabilities(7) allow starting as unprivileged user in the first
place, otherwise programs only need to start and perform privileged
actions such as bind(2)ing sockets as root, after that they can and
should! drop privileges.

Instead of updating/repeating supported systems, drop listings.

18 months agoSprinkle OpenBSD news in README.md
Klemens Nanni [Tue, 30 Jan 2024 02:03:36 +0000 (03:03 +0100)] 
Sprinkle OpenBSD news in README.md

18 months agofix [-Wunused-variable] for keep* variables
Klemens Nanni [Tue, 30 Jan 2024 01:52:49 +0000 (02:52 +0100)] 
fix [-Wunused-variable] for keep* variables

18 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 29 Jan 2024 16:57:51 +0000 (16:57 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

18 months agoMerge pull request #1795 from klemensn/manual-section
Mike Brady [Mon, 29 Jan 2024 16:32:36 +0000 (16:32 +0000)] 
Merge pull request #1795 from klemensn/manual-section

Move shairport-sync manual from section 7 to 1

18 months agoMerge pull request #1794 from klemensn/per-socket-keepidle
Mike Brady [Mon, 29 Jan 2024 16:28:06 +0000 (16:28 +0000)] 
Merge pull request #1794 from klemensn/per-socket-keepidle

No per-socket TCP keepidle on OpenBSD

18 months agoMerge pull request #1793 from klemensn/control-socket
Mike Brady [Mon, 29 Jan 2024 16:23:31 +0000 (16:23 +0000)] 
Merge pull request #1793 from klemensn/control-socket

Connect to NQPTP control socket on localhost

18 months agoMerge pull request #1782 from vs49688/master
Mike Brady [Mon, 29 Jan 2024 14:40:56 +0000 (14:40 +0000)] 
Merge pull request #1782 from vs49688/master

Makefile.am: allow manually installing config files

18 months agoMakefile.am: allow manually installing config files 1782/head
Zane van Iperen [Tue, 2 Jan 2024 05:37:31 +0000 (15:37 +1000)] 
Makefile.am: allow manually installing config files

Adds a "install-config-files" Makefile target that installs the config
files and dbus policies to DESTDIR=, regardless of whether
--with{,out}-configfiles is specified.

18 months agoMove shairport-sync manual from section 7 to 1 1795/head
Klemens Nanni [Sat, 27 Jan 2024 18:40:04 +0000 (19:40 +0100)] 
Move shairport-sync manual from section 7 to 1

From mandoc man(1) [-s] section:
                   1         General commands (tools and utilities).
                   [...]
                   7         Miscellaneous information.

From GNU man(1) DESCRIPTION:
     1   Executable programs or shell commands
     [...]
     7   Miscellaneous (including macro packages and conventions), e.g.
         man(7), groff(7)

shairport-sync is an executable, shairport-sync(1) ought to be its
documentation, not merely miscellaneous information.

OpenBSD adjusts this in its audio/shairport-sync port/package ever since.

18 months agoNo per-socket TCP keepidle on OpenBSD 1794/head
Klemens Nanni [Sat, 27 Jan 2024 18:15:07 +0000 (19:15 +0100)] 
No per-socket TCP keepidle on OpenBSD

A system-wide sysctl(2) net.inet.tcp.keepidle exists, but there is no
setsockopt(2) equivalent.

18 months agoConnect to NQPTP control socket on localhost 1793/head
Klemens Nanni [Sat, 27 Jan 2024 07:27:46 +0000 (08:27 +0100)] 
Connect to NQPTP control socket on localhost

nqptp.c listens on "localhost", but shairport-sync connectes to the wildcard
address 0/0.  This apparently works on Linux and FreeBSD, but OpenBSD fails:

```
$ ktrace shairport-sync -v -u
[...]
         0.000038288 "ptp-utilities.c:243" *fatal error: error sending timing_peer_list to NQPTP
         0.000021868 "shairport.c:1728" emergency exit
$ kdump
[...]
  2319 shairport-sync STRU  struct sockaddr { AF_INET, 0.0.0.0:9000 }
  2319 shairport-sync RET   sendto -1 errno 51 Network is unreachable
[...]
```

Resolve and connect to "localhost" just like NQPTP does, resulting in
127.0.0.1 or ::1 as socket addresses.

This is required to run when configured `--with-airplay-2`.
Tested on OpenBSD/amd64 7.4-current with shairport-sync 2.4.3 and nqptp
1.2.5-dev cfa8315 (plus OpenBSD fixes).

I expect Linux and FreeBSD to work as before, but have not tested it.

20 months agoQuieten some debug messages.
Mike Brady [Sun, 12 Nov 2023 11:50:21 +0000 (11:50 +0000)] 
Quieten some debug messages.

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 6 Nov 2023 11:15:58 +0000 (11:15 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoUpdate CAR INSTALL.md
Mike Brady [Mon, 6 Nov 2023 11:07:06 +0000 (11:07 +0000)] 
Update CAR INSTALL.md

21 months agoUse pthread_rwlock_wrlock instead of the incorrect use of pthread_rdlock_wrlock when...
Mike Brady [Tue, 31 Oct 2023 09:01:24 +0000 (09:01 +0000)] 
Use pthread_rwlock_wrlock instead of the incorrect use of pthread_rdlock_wrlock when tearing down a connection.

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 30 Oct 2023 17:51:52 +0000 (17:51 +0000)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoA bit late, but tag this as 4.3.3-dev. Also merge in the commit history of the master...
Mike Brady [Mon, 30 Oct 2023 17:46:12 +0000 (17:46 +0000)] 
A bit late, but tag this as 4.3.3-dev. Also merge in the commit history of the master branch.

21 months agomerge back in 4.3.2, a bit lae... 4.3.3-dev
Mike Brady [Mon, 30 Oct 2023 17:32:43 +0000 (17:32 +0000)] 
merge back in 4.3.2, a bit lae...

21 months agoUpdate CAR INSTALL.md
Mike Brady [Mon, 30 Oct 2023 17:07:28 +0000 (17:07 +0000)] 
Update CAR INSTALL.md

21 months agoUpdate CAR INSTALL.md
Mike Brady [Mon, 23 Oct 2023 14:10:54 +0000 (15:10 +0100)] 
Update CAR INSTALL.md

21 months agoUpdate CAR INSTALL.md
Mike Brady [Mon, 23 Oct 2023 13:49:02 +0000 (14:49 +0100)] 
Update CAR INSTALL.md

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 23 Oct 2023 10:48:13 +0000 (11:48 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 23 Oct 2023 10:46:20 +0000 (11:46 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoMerge branch 'development' of github.com:mikebrady/shairport-sync into development
Mike Brady [Mon, 23 Oct 2023 10:42:04 +0000 (11:42 +0100)] 
Merge branch 'development' of github.com:mikebrady/shairport-sync into development
Online updates.

21 months agoStop some warnings during build for Docker.
Mike Brady [Mon, 23 Oct 2023 10:41:20 +0000 (11:41 +0100)] 
Stop some warnings during build for Docker.

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 23 Oct 2023 09:18:12 +0000 (10:18 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 23 Oct 2023 09:17:33 +0000 (10:17 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoBookworm and simplifications
Mike Brady [Mon, 23 Oct 2023 09:07:53 +0000 (10:07 +0100)] 
Bookworm and simplifications

 Update for Bookworm and make some simplifications.

21 months agoUpdate CAR INSTALL.md
Mike Brady [Sun, 22 Oct 2023 12:06:45 +0000 (13:06 +0100)] 
Update CAR INSTALL.md

Update for Bookworm and simplify some steps. Add some information about updating.

21 months agoUpdate CAR INSTALL.md
Mike Brady [Sun, 15 Oct 2023 21:24:50 +0000 (22:24 +0100)] 
Update CAR INSTALL.md

21 months agoUpdate CAR INSTALL.md
Mike Brady [Sun, 15 Oct 2023 21:24:03 +0000 (22:24 +0100)] 
Update CAR INSTALL.md

21 months agoMerge branch 'development' 4.3.2
Mike Brady [Sun, 15 Oct 2023 17:20:18 +0000 (18:20 +0100)] 
Merge branch 'development'

Update to 4.3.2
**Enhancements**
* A totally new PipeWire backend featuring full synchronisation.

**Bug Fixes**
* Stability improvements for the PulseAudio backend.
* Fix a crash when the Avahi subsystem became disconnected. This is normally a rare occurrence, but Shairport Sync was not dereferencing obsolete data correctly when it happened.
* Set and reset Bonjour flags correctly when it's a Classic Airplay session in AirPlay 2 operation.
* Fix a number of FreeBSD compilation errors and warnings.
* Fix various errors when breaking into an existing session to terminate it. Thanks again to [aaronk6](https://github.com/aaronk6).
* Fix some debug message errors, sigh. Thanks to [Nathan Gray](https://github.com/n8gray).

21 months agoUpdate CAR INSTALL.md
Mike Brady [Sun, 15 Oct 2023 07:32:02 +0000 (08:32 +0100)] 
Update CAR INSTALL.md

Add note about Bookworm

21 months agoUpdate CAR INSTALL.md
Mike Brady [Sun, 15 Oct 2023 07:30:25 +0000 (08:30 +0100)] 
Update CAR INSTALL.md

Add note about Bookworm

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Fri, 13 Oct 2023 06:56:30 +0000 (07:56 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoChange response to a /feedback message in a Classic AirPlay session to 501 Not Implme...
Mike Brady [Fri, 13 Oct 2023 06:52:51 +0000 (07:52 +0100)] 
Change response to a /feedback message in a Classic AirPlay session to 501 Not Implmemented instead of 200 OK.

21 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Sun, 8 Oct 2023 16:49:35 +0000 (17:49 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

21 months agoReturn code 200 for a POST of type /feedback, and continue to return 500 for everythi...
Mike Brady [Sun, 8 Oct 2023 16:43:02 +0000 (17:43 +0100)] 
Return code 200 for a POST of type /feedback, and continue to return 500 for everything else.

21 months agoTypo
Mike Brady [Sun, 8 Oct 2023 16:40:43 +0000 (17:40 +0100)] 
Typo

22 months agoMerge branch 'development' of github.com:mikebrady/shairport-sync into development
Mike Brady [Fri, 6 Oct 2023 10:13:42 +0000 (11:13 +0100)] 
Merge branch 'development' of github.com:mikebrady/shairport-sync into development

Online update.

22 months agoMove the PipeWire stanza up in the configuration file.
Mike Brady [Fri, 6 Oct 2023 10:13:30 +0000 (11:13 +0100)] 
Move the PipeWire stanza up in the configuration file.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Fri, 6 Oct 2023 09:58:24 +0000 (10:58 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoAdd PipeWire sink target setting. Fix PipeWire node name code, duh, remove code that...
Mike Brady [Fri, 6 Oct 2023 09:51:49 +0000 (10:51 +0100)] 
Add PipeWire sink target setting. Fix PipeWire node name code, duh, remove code that was double-deallocating settings strings.

22 months agoRemove code that was double-deallocating settings strings.
Mike Brady [Fri, 6 Oct 2023 09:50:30 +0000 (10:50 +0100)] 
Remove code that was double-deallocating settings strings.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Thu, 5 Oct 2023 15:43:09 +0000 (16:43 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Thu, 5 Oct 2023 15:42:34 +0000 (16:42 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoChange node_name default to "Shairport Sync", parameterise a few settings.
Mike Brady [Thu, 5 Oct 2023 15:40:42 +0000 (16:40 +0100)] 
Change node_name default to "Shairport Sync", parameterise a few settings.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Thu, 5 Oct 2023 08:50:17 +0000 (09:50 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoAdd two PipeWire backend ("pw") settings -- application_name (default: "Shairport...
Mike Brady [Thu, 5 Oct 2023 08:41:21 +0000 (09:41 +0100)] 
Add two PipeWire backend ("pw") settings -- application_name (default: "Shairport Sync") and node_name (default: "shairport-sync").

22 months agoDeallocate settings strings on exit.
Mike Brady [Thu, 5 Oct 2023 08:39:22 +0000 (09:39 +0100)] 
Deallocate settings strings on exit.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 2 Oct 2023 09:13:01 +0000 (10:13 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 2 Oct 2023 09:12:31 +0000 (10:12 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoSend silence when no audio is coming through from Shairport Sync. This eliminates...
Mike Brady [Mon, 2 Oct 2023 09:06:55 +0000 (10:06 +0100)] 
Send silence when no audio is coming through from Shairport Sync. This eliminates (?) xrun errors. Clean up a few imprefections.

22 months agoQuieten a debug message.
Mike Brady [Mon, 2 Oct 2023 09:05:21 +0000 (10:05 +0100)] 
Quieten a debug message.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Sun, 1 Oct 2023 08:37:07 +0000 (09:37 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoComplete replacement of the PipeWire backend with a new implementation with full...
Mike Brady [Sun, 1 Oct 2023 08:30:29 +0000 (09:30 +0100)] 
Complete replacement of the PipeWire backend with a new implementation with full synchrnoisation. Works well, but still preliminary.

22 months agoStability improvements -- take more care when the fifi is full, fix a logical error...
Mike Brady [Sun, 1 Oct 2023 08:28:41 +0000 (09:28 +0100)] 
Stability improvements -- take more care when the fifi is full, fix a logical error in the use of the buffer mutex.

22 months agostop linker errors if built alongside audio_pa
Mike Brady [Sat, 30 Sep 2023 16:25:42 +0000 (17:25 +0100)] 
stop linker errors if built alongside audio_pa

22 months agoReplace the pipewire backend completely. Play writes to a buffer. The on_process...
Mike Brady [Sat, 30 Sep 2023 14:45:41 +0000 (15:45 +0100)] 
Replace the pipewire backend completely. Play writes to a buffer. The on_process() function reads from the buffer and updates timing information for the delay() function. Barebones -- can't set the app name or the volume. Assumes no further delays and no buffers when on_process is called. But it works!

22 months agomutex lock was protecting the wrong variable, duh.
Mike Brady [Sat, 30 Sep 2023 14:41:40 +0000 (15:41 +0100)] 
mutex lock was protecting the wrong variable, duh.

22 months agoFix potential bug if the timing data is inconsistent for 10 tries.
Mike Brady [Sat, 30 Sep 2023 14:40:40 +0000 (15:40 +0100)] 
Fix potential bug if the timing data is inconsistent for 10 tries.

22 months agoInitial tone-generator based pipewire backend compiling and apparently working, valgr...
Mike Brady [Fri, 29 Sep 2023 15:32:12 +0000 (16:32 +0100)] 
Initial tone-generator based pipewire backend compiling and apparently working, valgrind is happy too.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Fri, 29 Sep 2023 08:48:32 +0000 (09:48 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoDon't mute if the volume control is at minimum (-144.0) and ignore_volume_control...
Mike Brady [Fri, 29 Sep 2023 08:41:07 +0000 (09:41 +0100)] 
Don't mute if the volume control is at minimum (-144.0) and ignore_volume_control is seelcted.

22 months agoActually _do_ change the latency to 200000 in the PipeWire backend as previously...
Mike Brady [Wed, 27 Sep 2023 11:38:02 +0000 (12:38 +0100)] 
Actually _do_ change the latency to 200000 in the PipeWire backend as previously promied, duh.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Wed, 27 Sep 2023 09:53:07 +0000 (10:53 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoVery very rarely, the avahi client becomes disconnected.
Mike Brady [Wed, 27 Sep 2023 09:36:28 +0000 (10:36 +0100)] 
Very very rarely, the avahi client becomes disconnected.

This usually means there are problems in the system as a whole rahter than with Shairport Sync.

However, Shairport Sync was not cleaning up properly before deleting the now-disconnected avahi client and
creating a new one in an attempt to reconnect. That caused Shairport Sync to crash even if the new avahi client
was created successfully.

So this commit has code to delete the avahi group and broswer callback before deleting the disconnected avahi client.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 25 Sep 2023 15:23:34 +0000 (16:23 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoMake the pipewire latency 200000 (uS?) instead of 20000.
Mike Brady [Mon, 25 Sep 2023 15:19:32 +0000 (16:19 +0100)] 
Make the pipewire latency 200000 (uS?) instead of 20000.

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Mon, 25 Sep 2023 08:42:23 +0000 (09:42 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoAdd missing arguments to some debug messages. They could potentially cause crashes...
Mike Brady [Mon, 25 Sep 2023 08:37:47 +0000 (09:37 +0100)] 
Add missing arguments to some debug messages. They could potentially cause crashes just when you need them to work properly, sigh!

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Sun, 24 Sep 2023 16:35:15 +0000 (17:35 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoWhen a connection termiates abruptly while is it the principal_conn, make sure it...
Mike Brady [Sun, 24 Sep 2023 16:22:22 +0000 (17:22 +0100)] 
When a connection termiates abruptly while is it the principal_conn, make sure it sets the principal_conn
to NULL and cleans up the bonjour flags, if appropriate.

Simplify the TEARDOWN handlers and the thress teardown functions by incporporating
the above code in the teardown_phase_two (for AP2) and teardown (fpr AP1) functions.

It means that closing a connection will block on the principal_conn_lock, so if
you have the principal_conn_lock, closing will not complete until you release it.

Maybe we need a principal_conn_acquisition_lock for that...

22 months agoUpdate RELEASENOTES-DEVELOPMENT.md
Mike Brady [Fri, 22 Sep 2023 14:08:47 +0000 (15:08 +0100)] 
Update RELEASENOTES-DEVELOPMENT.md

22 months agoQuieten a debug message.
Mike Brady [Thu, 21 Sep 2023 16:28:03 +0000 (17:28 +0100)] 
Quieten a debug message.

22 months agoclang format
Mike Brady [Thu, 21 Sep 2023 15:45:22 +0000 (16:45 +0100)] 
clang format

22 months agoRemove a few debug messages.
Mike Brady [Thu, 21 Sep 2023 15:41:48 +0000 (16:41 +0100)] 
Remove a few debug messages.

22 months agoSet and reset bonjour flags correctly when it's a Classic Airplay session. Reintroduc...
Mike Brady [Thu, 21 Sep 2023 15:36:21 +0000 (16:36 +0100)] 
Set and reset bonjour flags correctly when it's a Classic Airplay session. Reintroduce a 1 second delay for the prempted session to go away.

22 months agoRemove redundant (and now faulty) check to see if the player is also principal conn.
Mike Brady [Thu, 21 Sep 2023 15:34:40 +0000 (16:34 +0100)] 
Remove redundant (and now faulty) check to see if the player is also principal conn.

22 months agoupdate to correspond with the move of principal_conn_lock to a pthread_rwlock.
Mike Brady [Thu, 21 Sep 2023 15:33:19 +0000 (16:33 +0100)] 
update to correspond with the move of  principal_conn_lock to a pthread_rwlock.

22 months agoChange principal_conn_lock from a regular mutex to a read-write mutex, so it can...
Mike Brady [Thu, 21 Sep 2023 15:04:23 +0000 (16:04 +0100)] 
Change principal_conn_lock from a regular mutex to a read-write mutex, so it can be used to check and hold the current principal_conn unless it's being altered in get_play_lock or a release_play_lock.
Only allow access to the config.airplay_statusflags, build_bonjour_strings(NULL), mdns_update(NULL, secondary_txt_records) when read_lock is acquired on the principal_conn_lock.
Only allow changes to config.airplay_statusflags and only allow access to mdns_update if you are the principal conn.

The bonjour status flags and the info response plist calculations are still a dirty rotten hack.

22 months agoAdd a pthread_cleanup compatible function to release a pthread_rwlock.
Mike Brady [Thu, 21 Sep 2023 14:50:43 +0000 (15:50 +0100)] 
Add a pthread_cleanup compatible function to release a pthread_rwlock.

22 months agomove the declaration of principal_conn_lock from player.h to rtsp.h where it should be.
Mike Brady [Thu, 21 Sep 2023 14:49:25 +0000 (15:49 +0100)] 
move the declaration of principal_conn_lock from player.h to rtsp.h where it should be.