]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Remove command pointer from struct command_context.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Jan 2015 23:00:41 +0000 (00:00 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:47 +0000 (23:23 +0200)
commit16c6fc10f3344e3eec66e51580821d854d49aa62
treec9b6db0aa0a79516484b76fe02f01ee9feba4648
parent7f4c8ebb15388f1ffde4bc2dd956f11522797a95
server: Remove command pointer from struct command_context.

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.
command.c
command.h