]> git.tuebingen.mpg.de Git - paraslash.git/commit - aft.c
Introduce afs_error().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 30 Aug 2022 11:55:54 +0000 (13:55 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Oct 2022 18:36:21 +0000 (20:36 +0200)
commit0b5c29fae8853bac16b91503df70b0e101dccca4
treee06a3fbfbe136cdb4a0b7ba4d735fc6b716ce3ef
parent1f33eda05b3e96b32817a133287bcfc5e99ed6b4
Introduce afs_error().

The callbacks of some afs commands employ the normal ->pbpout para
buffer to send an error message to the client on failure. These
messages are therefore tagged with the OUTPUT sideband designator
just as regular command output.

The receiving client writes such messages to stdout, so applications
which call para_client have no other way than parsing the output to
guess whether it is normal command output or an error message.

This commit improves on this by providing a public helper in afs.c
to format and send an error message that is tagged with the ERROR
sideband designator and thus gets written to stderr on the client
side. All afs callbacks which currently use ->pbout for error messages
are converted to call the new helper.
afs.c
afs.h
aft.c
attribute.c
blob.c
mood.c
playlist.c