Wim Taymans
546de65c67
pulse: sanitize the remote name
...
We use the remote name as a suffix for the default server address and so
it should not contain any slashes. Take everything after the last slash
if there is one.
2025-01-29 12:09:36 +01:00
Wim Taymans
0dfd6d997f
protocol-pulse: implement readiness notification
...
Write a newline to the fd in the PIPEWIRE_PULSE_NOTIFICATION_FD env
variable when set.
This is to implement readiness notification as suggested in
https://skarnet.org/software/s6/notifywhenup.html
Fixes #4347
2024-10-22 09:50:27 +02:00
Barnabás Pőcze
934ab3036e
treewide: use SPDX tags to specify copyright information
...
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.
See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
c8850f8766
env vars should override everything
...
Always first use the env var and then check the properties. So that
PIPEWIRE_CORE=pipewire-1 PIPEWIRE_REMOTE=pipewire-1 make run runs
everything on pipewire-1 sockets regardless of the config files.
Also PIPEWIRE_NODE always needs to be taken into account first.
2023-01-24 17:39:54 +01:00
Demi Marie Obenour
bb4f274ae0
Make all fopen() calls use O_CLOEXEC
...
by adding "e" to the mode strings.
2022-09-23 15:19:01 +00:00
Lucas Holt
6a15a02ec2
Add support for MidnightBSD
...
Fix build issue
Fix build issue
2022-06-19 18:22:47 +00:00
Wim Taymans
4821c7ca2f
pulse-server: don't append "/pulse" to PULSE_RUNTIME_PATH
...
Fixes #2431
2022-06-09 17:06:07 +02:00
Wim Taymans
13c0cbb899
pulse-server: remove unused defines
2022-01-04 10:08:54 +01:00
Peter Hutterer
52a96bb602
modules: add log topics to module-protocol-pulse
...
This ends up using a nested namespace: mod.protocol-pulse for the module
itself, mod.protocol-pulse.foo for the various submodules and
extensions.
2021-09-28 09:35:39 +02:00
Wim Taymans
8e8cb34dc2
protocol: don't place sockets in $HOME
...
No server will put them there and no client will look for it there.
2021-07-27 10:57:31 +02:00
Barnabás Pőcze
b6405b761f
pulse-server: use sizeof() instead of hard-coding
...
Use `sizeof("/pid")` instead of hard-coding 5
in the condition.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
627ef37a77
pulse-server: use pid_t where appropriate
...
Instead of `int`, use the `pid_t` type to represent
process identifiers.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
2d27497045
pulse-server: use S_ISDIR()
...
Use the `S_ISDIR()` macro instead of `S_IFMT` and bitwise operations
to make the code simpler.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
e90a70fd49
pulse-server: check if a runtime directory could be found
...
Print an error message and return an error code if all
options have been exhausted without success.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
30e3884a75
pulse-server: add another check for the return value of snprintf()
...
In addition to checking if the resulting string would
be too long, also check whether or not snprintf failed.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
67b422fa18
pulse-server: fix potential use of dangling pointer
...
`getpwuid_r()` puts the strings pointed to from the returned
passwd struct into the specified buffer. Previously, that
buffer technically didn't live long enough to be usable
in the `snprintf()` call - although in practice this didn't
appear to be a problem. A particular version of GCC 11 generates
the same machine code for this function regardless whether
this patch is applied or not. Still, fix this by moving
the buffer to an outer scope.
2021-07-25 15:17:08 +02:00
Barnabás Pőcze
62832609c1
pulse-server: split out utils
...
Part of !776 .
2021-06-25 03:23:18 +02:00