]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Convert com_lsatt() to lopsub.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 20 Mar 2016 18:40:19 +0000 (18:40 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
commitdb8b6df30d17d9f93c60758e156699067121cbb5
treeeb28093569d77b78da4dea2d6244396bbd203e30
parenta9bdbe2c8a73675be499fc95b935f3839e30c575
server: Convert com_lsatt() to lopsub.

This is the first afs subcommand which needs to pass a pattern list
to its callback. The new send_lls_callback_request() provides this
functionality. It serializes the parse result into a buffer and passes
this buffer to the callback.

Since there are non-lopsub commands which also pass a pattern list,
action_if_pattern_matches() is patched to receive the pattern
list either from the serialized parse result or in the old way via
pmd->data. To achieve this, a parse result pointer is added to struct
pattern_match_data. If this pointer is not NULL, we are dealing with
a subcommand that has been converted.

Since the ls subcommand has not been converted yet, lopsub will
regard "ls" as a uniqe abbreviation of the lsatt command, which
breaks t0004. To work around this, we deactivate prefix matching by
only accepting exact matches in run_command(). This workaround can
be removed after com_ls() has been converted.
13 files changed:
afs.c
afs.cmd
afs.h
attribute.c
command.c
m4/lls/server_cmd.suite.m4
mm.c
mood.c
playlist.c
score.c
send_common.c
server.c
vss.c