<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/audioc.c, branch next</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=next</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-09-20T16:35:52Z</updated>
<entry>
<title>audioc.c: Fix typo in comment.</title>
<updated>2026-09-20T16:35:52Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-09-18T20:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=fb7fe4cee857f562237f59d125455bb67ee9cdd1'/>
<id>urn:sha1:fb7fe4cee857f562237f59d125455bb67ee9cdd1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>gui: Avoid the para_audioc process.</title>
<updated>2026-07-14T18:11:18Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-05-26T21:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3f0ad7aef67b6707f52c71931186ab0b20865a1a'/>
<id>urn:sha1:3f0ad7aef67b6707f52c71931186ab0b20865a1a</id>
<content type='text'>
This changes gui.c to no longer spawn a para_audioc process to get the status
items from para_audiod. Instead, the para_gui process connects directly to
audiod using the same mechanism as para_audioc. Besides being more efficient,
this approach has the advantage that status item updates are now atomic in
the sense that complete sideband packages (containing any number of status
items) are received, so torn status items can no longer occur.

To implement this, move the code that can be shared between gui and audioc
to a separate file, audioc_common.c. This file contains only one public
function: connect_audiod(). Since this function uses unix socket magic and
employs the sideband API, para_gui needs to link in net.o and sideband.o,
in addition to the new audioc_common.o.

With these changes in place, para_gui's --stat-command option becomes
unused. Drop it, as it's not worth the pain to introduce a depreciation
period. On the other hand, para_gui now needs an option to specify the path
to the socket on which para_audiod is expected to listen, so move the lopsub
stanza of para_audioc's --socket option to the new socket.m4 file and include
it from both the audioc and the gui lopsub suites.
</content>
</entry>
<entry>
<title>client/audioc: Create ~/.paraslash in interactive mode.</title>
<updated>2026-07-04T20:46:44Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-06-23T19:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3123128dbf3900fb7baf6c2a4577b76340ae4404'/>
<id>urn:sha1:3123128dbf3900fb7baf6c2a4577b76340ae4404</id>
<content type='text'>
If this directory does not exist, para_play creates it at startup. However,
para_client and para_audioc do not do that, hence they fail to write the
history file on exit.

Teach para_client and para_audioc to create ~/.paraslash just as para_play
does. Replace para_mkdir() by create_dot_paraslash() as this is what all
callers need.
</content>
</entry>
<entry>
<title>Switch to SPDX identifiers.</title>
<updated>2026-03-17T22:45:43Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-15T14:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ea0cecf96e08c489fdcc94d046019f4ce46f58e2'/>
<id>urn:sha1:ea0cecf96e08c489fdcc94d046019f4ce46f58e2</id>
<content type='text'>
Generated with

	sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h

followed by manually tweaking the result a bit. No license change intended.
</content>
</entry>
<entry>
<title>Remove support for audioc/audiod v1 protocol.</title>
<updated>2026-01-27T13:08:15Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-01-24T22:07:05Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=5f57f7b55b16ef00a4be5d748d1a6ae99b43ec7c'/>
<id>urn:sha1:5f57f7b55b16ef00a4be5d748d1a6ae99b43ec7c</id>
<content type='text'>
This breaks compatibility with v0.7, but also simplifies the code nicely.
</content>
</entry>
<entry>
<title>Fix the audioc sideband fix.</title>
<updated>2026-01-15T14:30:50Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-01-15T09:17:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=034b698b74539831c9004168867c743c2ec2dea8'/>
<id>urn:sha1:034b698b74539831c9004168867c743c2ec2dea8</id>
<content type='text'>
Unsurprisingly, the quick fix which intended to address a regression related
to early connection failures was flawed itself. This time, subcommands which
do not create output such as "on", "off" and "sb" broke.
</content>
</entry>
<entry>
<title>audioc sideband: Fix early error handling.</title>
<updated>2026-01-12T21:27:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-01-12T20:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=87ba17b3c75a5d979295eb05a8794c6f41bff533'/>
<id>urn:sha1:87ba17b3c75a5d979295eb05a8794c6f41bff533</id>
<content type='text'>
Both server and client handled the "permission denied" case (client UID
mismatch) incorrectly. This should fix it.
</content>
</entry>
<entry>
<title>Employ sideband API for audioc-audiod connections.</title>
<updated>2026-01-04T21:20:55Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-14T23:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=6a582184c35262f086ae4d29020d6000206f8901'/>
<id>urn:sha1:6a582184c35262f086ae4d29020d6000206f8901</id>
<content type='text'>
Currently, para_audioc writes the data it received over the local socket from
audiod to stdout. This include error messages, if any. Also, para_audioc
does not know whether the subcommand passed to para_audiod was successful,
and exits successfully even if the subcommand failed.

Thanks to the sideband API, para_client is much smarter in this regard. This
patch employs the existing API also for the connection between para_audioc and
para_audiod. Besides comment updates and the new sideband_log() helper, no
changes to the sideband API are necessary. The client code stays unmodified
as well. The new helper has three callers, two in audioc.c and one in
client_common.c.

Remove a pointless NULL check and a debug log message from dispatch_sbb()
of client_common.c while at it. The message was useful for testing but is
no longer needed.

The new code is backwards compatible, i.e., an old para_audioc can still
communicate with a new para_audiod and vice versa. Thus, we have to maintain
two "protocols" for the audioc-audiod communication, named v1 and v2 in the
code and in what follows.

For example, if audioc or audiod are unpatched (so that v1 is in use), then

	./para_audioc aaa &gt; /dev/null

prints nothing because with v1 the error message goes to stdout, and the
command exits successfully (exit code 0). If both sides support v2, the same
command prints

	audiod: errctx: aaa
	audiod: invalid subcommand
	main: audiod dispatch error

to stderr, then exits unsuccessfully (exit code 1).

Only the server reply is sideband-encoded. The way how command line arguments
are passed from audioc to audiod is also changed, though. Instead of
terminating the arguments with newlines, a v2 audioc prepends an additional
\0 byte to the argument list, and terminates each argument with \0 in the
same way the --print0 directive of GNU find(1) does.

An v1 audiod interprets the leading NUL as an empty command line and closes
the connection without sending any data. This can never happen with a v2
audiod because that always sends an empty sideband package to indicate
success/failure. So the v2 code of audioc.c retries with v1 in this case.

Conversely, a v1 client never sends an empty string, so a leading \0 identifies
a v2 client. Thus, the patched audiod only needs to check the first byte of
the received buffer to select the right "protocol" version.

The stat and grab subcommands need special treatment because these may stay
active after the command handler returns. Thus, the command handler must not
send an EXIT_SUCCESS sideband packet in this case. Moreover, the protocol
version needs to be communicated with the status/grab client tasks. This is
done by adding a flag to the existing flags bitmask of struct stat_client
and struct grab_client.

After v0.8.0 has been released, the compatibility code can be dropped.
</content>
</entry>
<entry>
<title>Use iovecs for unix socket credentials.</title>
<updated>2026-01-04T21:20:55Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-10T20:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=983a349d925ce7d1b6471c3b63770c76b970ada4'/>
<id>urn:sha1:983a349d925ce7d1b6471c3b63770c76b970ada4</id>
<content type='text'>
This is the right thing to do, since {recv,send}_cred_buffer() need to set
up an iovec structure.
</content>
</entry>
<entry>
<title>Make send_cred_buffer() and recv_cred_buffer() local.</title>
<updated>2026-01-04T21:20:54Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-03T17:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3df3c8880f06dc4058a4c58c291892835ca8eb06'/>
<id>urn:sha1:3df3c8880f06dc4058a4c58c291892835ca8eb06</id>
<content type='text'>
Only para_audioc needs the former, and only para_audiod needs the latter.
With this patch in place, both functions can be static and the other
executables which link in net.o don't get bloated with unnecessary code.
</content>
</entry>
</feed>
