<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/command.h, branch master</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-04-29T18:37:48Z</updated>
<entry>
<title>Kill afs socket cookie and afs_client_list.</title>
<updated>2026-04-29T18:37:48Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-31T22:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=7557912e8a30577b85ae91c7f984173776e72e09'/>
<id>urn:sha1:7557912e8a30577b85ae91c7f984173776e72e09</id>
<content type='text'>
We now create a per-command socket pair in the command handler and use the
permanent server-afs socket to pass one end of the pair from the command
handler to the afs process.

With this approach only the command handlers can possibly talk to the
afs process, so we don't need to worry about malicious or bogus connections
arriving at the local socket.

Consequently, we may remove the socket cookie and employ blocking I/O for the
shared memory identifiers that are transferred through the per-command socket.
Connections are now dispatched in one go, obviating the need to keep track
of connected clients. So remove struct afs_client and the client list.
</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>doxygen: Hide user_data variables.</title>
<updated>2025-10-08T18:58:23Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-06-16T22:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=9a8ad2ce61b0e7c1fed85c565096c46a0be5989e'/>
<id>urn:sha1:9a8ad2ce61b0e7c1fed85c565096c46a0be5989e</id>
<content type='text'>
These just clutter the generated documentation, particularly the list of
global variables.
</content>
</entry>
<entry>
<title>server: Constify return value of lookup_user().</title>
<updated>2018-03-13T02:28:10Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-08-12T23:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=1a4ab483a2a41160e548e799609f964a7a6f3400'/>
<id>urn:sha1:1a4ab483a2a41160e548e799609f964a7a6f3400</id>
<content type='text'>
Command handlers only need to read this structure.
</content>
</entry>
<entry>
<title>server: Remove unused -&gt;peer from struct command_context.</title>
<updated>2017-08-08T09:50:55Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-08-06T20:40:05Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=594aec07b3b0511754129be74a8d643c38e1ae77'/>
<id>urn:sha1:594aec07b3b0511754129be74a8d643c38e1ae77</id>
<content type='text'>
It is initialized in handle_connect() but never used.
</content>
</entry>
<entry>
<title>server: Remove -&gt;argc, -&gt;argv from struct command_context.</title>
<updated>2017-03-26T09:02:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-05-22T11:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=7e9cc63d2f6539585d47221e75031ba8bc172dec'/>
<id>urn:sha1:7e9cc63d2f6539585d47221e75031ba8bc172dec</id>
<content type='text'>
Command handlers should not look at the argv[] vector directly
but only use the lopsub library functions to access the parsed
command line.

In fact, the only function which accesses the argv vector is
run_command(). Defining argc and argv as local variables in this
function allows to drop the two members from the command context
structure.
</content>
</entry>
<entry>
<title>server: Convert non-afs commands to lopsub.</title>
<updated>2017-03-26T09:02:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-06-12T13:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=1709cc8f8a54429441f8f83c38146e667133c727'/>
<id>urn:sha1:1709cc8f8a54429441f8f83c38146e667133c727</id>
<content type='text'>
Currently the server commands are divided into two group: those
commands which are handled by the server process and those which
communicate with the afs process. This commit converts the commands of
the former group and the corresponding completers for para_client to
the lopsub suite format while the afs commands will be converted in
subsequent commits. After this change para_server needs to be linked
with -llopsub.

To this aim the options and help texts of of the server commands are
transferred from server.cmd to the new server_cmd.suite.m4, enabling
long-style options in the progress. Moreover, an introduction is added
at the beginning of the list of server commands which describes how
server commands are executed.

Command permissions are now handled by making use of the aux_info
feature of lopsub. To keep those commands working which do not
have any permission bit set, we need to add a new identifier
NO_PERMISSION_REQUIRED to enum server_command_permissions of
user_list.h. The value of this identifier is zero of course.

Naturally the bulk of the change takes place in command.c where all
server commands are implemented. The command handlers are modified
to take a pointer to a struct lls_parse result as an additional
argument. A new helper, send_errctx(), is introduced to avoid code
duplication.

Since command.h now refers to a lopsub parse result, all files which
include command.h, including those which implement only afs commands,
need to include the system header lopsub.h.

To keep afs commands working, some compatibility code in run_command()
is added. This will go away after all commands have been converted.

A couple of macros in command.h ease the handling of the long symbolic
constants exposed by the generated lopsub header file.

Although only the non-afs commands are converted, the change allows
for a couple of cleanups:

	* The E_BAD_COMMAND error code is no longer needed and has been
	removed.

	* cmd_perms_itohuman() has become unused and is removed.

	* The server_cmds[] array is empty and can be removed, along
	with the loop in send_list_of_commands() which iterated over
	the array.

The patch also adjusts tests t0004 and t0005 since the help output
format changed slightly, breaking the expectations of these tests.
</content>
</entry>
<entry>
<title>server: Remove command pointer from struct command_context.</title>
<updated>2015-08-12T21:23:47Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2015-01-13T23:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=16c6fc10f3344e3eec66e51580821d854d49aa62'/>
<id>urn:sha1:16c6fc10f3344e3eec66e51580821d854d49aa62</id>
<content type='text'>
Command handlers should not know about this implementation detail.

This commit also changes parse_sb_command() to not only parse the
command line but to actually run the command in case the caller has
sufficient permissions. The function is renamed to run_command()
to reflect this change.

We use the opportunity to clean up the allocation and freeing of
the command buffer and the argument vector. Both are now freed in
the same function they were allocated, which is considered good
programming practice.
</content>
</entry>
<entry>
<title>server: Reduce scope of struct server_command.</title>
<updated>2015-08-12T21:23:47Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2015-01-13T23:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=7f4c8ebb15388f1ffde4bc2dd956f11522797a95'/>
<id>urn:sha1:7f4c8ebb15388f1ffde4bc2dd956f11522797a95</id>
<content type='text'>
This structure is only needed in command.c, so we can make it local
to this file. As structures defined in .c files are not included
in doxygen, the reference to struct server_command in server.h must
be removed.
</content>
</entry>
<entry>
<title>command: Make struct command_context-&gt;cmd_ptr const.</title>
<updated>2015-04-01T13:30:47Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2015-01-05T03:28:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=38de4128737b8d86c637d5d0edc7cffd74666bdc'/>
<id>urn:sha1:38de4128737b8d86c637d5d0edc7cffd74666bdc</id>
<content type='text'>
The fields of struct server command never need to be modified so they
can be const.
</content>
</entry>
</feed>
