<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/client_common.c, branch pu</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=pu</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=pu'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-08-30T17:21:53Z</updated>
<entry>
<title>Kill E_CLIENT_SYNTAX.</title>
<updated>2026-08-30T17:21:53Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-08-23T21:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=1c13f13b73da8450fde38643d4136c3136c5205f'/>
<id>urn:sha1:1c13f13b73da8450fde38643d4136c3136c5205f</id>
<content type='text'>
Only one reference: client_open() errors out if the argument vector does
not include any subcommand. The plain EINVAL seems to be a better fit for
this particular case, so..
</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>handshake: No longer announce/request the sha256 feature.</title>
<updated>2026-01-29T20:41:06Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-12-10T20:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=e276b8ad3688f376270caca4a3245f16d6648255'/>
<id>urn:sha1:e276b8ad3688f376270caca4a3245f16d6648255</id>
<content type='text'>
Since 0.7.x the server no longer checks the client request but uses sha256
unconditionally. At the same time para_client started to no longer check
whether the sha256 feature is announced by para_server but uses sha256
unconditionally.

This commit is the next step towards the removal of the feature. We need
to wait until 0.9.0 before the server starts to reject clients requesting
the feature.
</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>Make iov_valid() local and rename to iov_empty().</title>
<updated>2025-11-22T20:15:33Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-18T21:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=fd745143d2fc3454966544d4078866d92b4247a8'/>
<id>urn:sha1:fd745143d2fc3454966544d4078866d92b4247a8</id>
<content type='text'>
The two callers in client_common.c don't need the check because
btr_add_output() will do the right thing when called with a zero-sized buffer
and para_log() can be taught the same by using the precision specifier for
the %s format string (i.e., "%s" becomes "%.*s").

This also fixes a potential (i.e, never seen in real life) para_client(1)
buffer overflow because dispatch_sbb() logged a buffer received from the
server process via the "%s" format string without explicitly terminating the
buffer with \0. The precision specifier limits the number of bytes printed
from the "string" to the number of bytes received, avoiding the overflow.

The old name was a misnomer because a zero-sized vector may well be valid
in the sideband context where packets with an empty buffer still carry
information in the band designator. For example the SBD_SUCCESS designator
is used with an empty buffer to indicate success.
</content>
</entry>
<entry>
<title>Improve client documentation.</title>
<updated>2025-10-08T18:58:23Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-06-16T18:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=7d8f67181d4c995ed1544253719a4f6613838227'/>
<id>urn:sha1:7d8f67181d4c995ed1544253719a4f6613838227</id>
<content type='text'>
The new file comment for client.c, its dedoxification, and a bunch of
miscellaneous improvements for the public functions of client_common.c.
</content>
</entry>
<entry>
<title>Merge topic branch t/rm_sha1 into master</title>
<updated>2025-09-22T17:14:21Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-09-22T17:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ff2da64afb565c835c73aad093f7d6b60c329ea0'/>
<id>urn:sha1:ff2da64afb565c835c73aad093f7d6b60c329ea0</id>
<content type='text'>
The series first drops the para_upgrade_db executable because it is no longer
needed. This removes the penultimate user of the sha1 infrastructure. The
remaining commits deal with the last user: the handshake between para_client
and para_server. Since paraslash-0.7.0, client and server employ sha256
by default, but fall back to sha1 in order to stay compatible to old 0.6.x
versions. After this series, server and client always employ sha256 as the
hash algorithm, breaking compatibility with 0.6.x clients. As a result,
the sha1 hash algorithm is no longer used anywhere, so the corresponding
infrastructure is no longer needed. This gets rid of a fair amount of code.

* refs/heads/t/rm_sha1:
  Rename hash2 -&gt; hash.
  Remove sha1.
  Remove para_upgrade_db.
  aft: Compare the full hash, not just the first 20 bytes.
</content>
</entry>
<entry>
<title>Remove loglevel argument of client_parse_config().</title>
<updated>2025-09-13T18:21:32Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-09-07T20:03:27Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=f29f87c74d55d99eec0a081879c8a232ba9de051'/>
<id>urn:sha1:f29f87c74d55d99eec0a081879c8a232ba9de051</id>
<content type='text'>
There are two callers, one in client_common.c and one in client.c. The
former passes NULL, hence does not need the argument. The latter passes a
non-NULL pointer to initialize the global client_loglevel integer, but this
initialization can as well be done in the caller, simplifying the code a bit.
</content>
</entry>
<entry>
<title>Remove loglevel argument of client_open().</title>
<updated>2025-09-13T18:21:32Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-09-04T17:24:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=edaa61da570419f46b5b2bf1e32aff5a5ec901ba'/>
<id>urn:sha1:edaa61da570419f46b5b2bf1e32aff5a5ec901ba</id>
<content type='text'>
Both callers pass NULL.
</content>
</entry>
<entry>
<title>Rename hash2 -&gt; hash.</title>
<updated>2025-05-22T17:08:23Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-05-18T18:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=cb041d0305b8aeda8130f1febd7c31dd269ea83a'/>
<id>urn:sha1:cb041d0305b8aeda8130f1febd7c31dd269ea83a</id>
<content type='text'>
Now that sha1 is no longer supported, the hash2 naming has become meaningless.
Rename it back to "hash".
</content>
</entry>
</feed>
