<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/attribute.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-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>Merge topic branch t/spdx into master</title>
<updated>2026-03-26T15:50:54Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-26T15:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c7d8695602cdde107a85cb63db846d92e48d9437'/>
<id>urn:sha1:c7d8695602cdde107a85cb63db846d92e48d9437</id>
<content type='text'>
Switch to SPDX licence identifiers

A single patch which replaces the first comment line of most .c and .h files
containing the copyright notice by standardized SPDX (Software/System Package
Data Exchange) nomenclature.

* t/spdx:
  Switch to SPDX identifiers.
</content>
</entry>
<entry>
<title>Merge topic branch t/init into master</title>
<updated>2026-03-25T20:58:48Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-25T20:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=42349b135a1aa4bc3b750112d2e790a41b245c20'/>
<id>urn:sha1:42349b135a1aa4bc3b750112d2e790a41b245c20</id>
<content type='text'>
Provide --init as a replacement for com_init()

This change does not need a deprecation period because initialization is
only necessary for new instances.

* t/init:
  afs: Simplify table open functions.
  server: Replace the init subcommand by --init.
</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>Refuse to remove an attribute if it is still in use.</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-08T20:36:49Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=e4b19a0d70f8efae545e8eeadf5e5a8bd852078a'/>
<id>urn:sha1:e4b19a0d70f8efae545e8eeadf5e5a8bd852078a</id>
<content type='text'>
This iterates over all audio files to check if the attribute to be removed
is still set in the on-disk afs_info structure of the audio file. If at
least one such audio file is detected, the rmatt subcommand aborts.

With this new behaviour, the existing loop in aft_event_handler() which
clears the corresponding bit from each on-disk afs_info can be removed. This
was the only event handler that looked at the bit number passed, so we may
as well pass NULL instead.
</content>
</entry>
<entry>
<title>afs: Improve addatt subcommand.</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-01T23:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=cf255ab2d4ef0d9861c769cb96587ec5f1a1a745'/>
<id>urn:sha1:cf255ab2d4ef0d9861c769cb96587ec5f1a1a745</id>
<content type='text'>
To obtain an unused bit in the attribute table we currently look up each
value in the range 0-63 in this table until we encounter an unused bit. It
is more efficient to fetch the attribute bitmask once, then compute the
first zero without calling into the osl library.

Also inefficient is that the addatt subcommand generates one ATTRIBUTE_ADD
event for each argument. This can be expensive because the event causes a
mood reload. Change that to generate only one event.
</content>
</entry>
<entry>
<title>Simplify and rename get_attribute_bitnum_by_name().</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-01T22:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=32dd8568133e89b6efcd93d30ce6428859eb3a6c'/>
<id>urn:sha1:32dd8568133e89b6efcd93d30ce6428859eb3a6c</id>
<content type='text'>
Return the bit number directly, avoiding the result pointer argument for
the bit number. Remove the pointless "one" variable in one of the callers,
the touch callback, while at it.
</content>
</entry>
<entry>
<title>Move get_attribute_bitmap() to aft.c.</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-01T22:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=5bd6e944f21e5d377f1438cc2593ba67663876dd'/>
<id>urn:sha1:5bd6e944f21e5d377f1438cc2593ba67663876dd</id>
<content type='text'>
The public get_attribute_bitmap() is defined in attribute.c and called from
the ls callback to print an attribute string such as xx--x, indicating which
attribute bits are set/unset. This function should instead be part of aft.c
where the ls subcommand is implemented, so move it there and make it static.

The ls command needs to know the highest used attribute number to limit the
output width of the attribute string. This number is currently maintained in
a global variable of attribute.c. Provide the public attr_get_max_bitnum()
helper to make it available to aft.c.

It is easier to compute the value when it is needed than to maintain the value
in a global variable. This is not performance critical anyway, since the ls
command calls the function only once (rather than once per audio file listed).
</content>
</entry>
<entry>
<title>Rename and improve get_attribute_text().</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-01T20:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=018009f8de6a782b216f3b8df67b90b1a499f154'/>
<id>urn:sha1:018009f8de6a782b216f3b8df67b90b1a499f154</id>
<content type='text'>
Rather than looking up each bit number in the attribute table, we now loop
over all existing attributes and check whether the corresponding bit is on
in the given attribute bitmask. This should be more efficient.

Switch to para buffers and drop the delimiter argument since the only user,
the callback of the ls subcommand, passes a constant value.
</content>
</entry>
<entry>
<title>afs: Improve attribute checking code.</title>
<updated>2026-03-17T18:25:05Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-01T20:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c0acbe0f65dda1252ffbcaa42a296e5d47a85364'/>
<id>urn:sha1:c0acbe0f65dda1252ffbcaa42a296e5d47a85364</id>
<content type='text'>
Currently both the audio file table and the attribute table implement a
check function. The latter first computes the bitmask which corresponds
to the defined attributes, then passes the resulting 64-bit integer to
aft_check_attributes(), which loops over all rows. The loop callback
de-serializes the afs_info structure of the row and checks the attributes
of the row against the bitmask.

This patch removes the check function of the attribute table as
well as aft_check_attributes(). The replacement is the new public
attr_get_defined_mask() in attribute.c.

To make this work, the check function of the audio file table is modified
to call the new function, then iterate over all rows as before, passing the
mask to the existing loop callback. The loop callback is extended to perform
the same check that aft_check_attributes() did before.

This simplifies the code, and should perform better because we now de-serialize
the afs_info struct only once per audio file rather than twice.

As a result, the --attributes option of the check command has become unused.
So we deprecate this option.
</content>
</entry>
</feed>
