]> git.tuebingen.mpg.de Git - paraslash.git/commit - client_common.c
Send command output via sideband.
authorAndre Noll <maan@systemlinux.org>
Sat, 5 May 2012 10:11:54 +0000 (12:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 7 May 2012 10:47:07 +0000 (12:47 +0200)
commit7dc1b56764191dab6aedf360c7a6d648fa49a37c
tree4ffb76d843d5a044e05081afbab7a1d40007871b
parent0229d751f7e4223e81d69bc2d8e9e5b5f3b10a0e
Send command output via sideband.

The next step towards sideband connections is to send the output of
each command as a sideband packet. To this aim, afs_cb_result_handler(),
pass_buffer_as_shm() and the callback_result_handler typedef are modified
to receive an additional "band" parameter.

For regular command output the value of this parameter is SBD_OUTPUT,
the sideband designator for normal output. The client code is patched
to add the contents of received SBD_OUTPUT sidband packets to the
buffer tree for the normal ouput.

However, log messages, which are only written to the log output
of the server at the moment, may also passed to the client via the
SBD_XXX_LOG designators, where XXX is the name of one of the usual
log levels for para_log().

The patch contains quite a few changes of the form

if (use_sideband)
do_new_stuff()
else
do_it_as_before()

which is a bit ugly, but we may remove the old method in 0.5.0,
which will support only sideband connections.
afs.c
afs.h
aft.c
attribute.c
blob.c
client_common.c
command.c
mood.c
playlist.c