From: Andre Noll Date: Tue, 8 Aug 2017 11:08:27 +0000 (+0200) Subject: server: Disable com_tasks(). X-Git-Tag: v0.6.2~51 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=bb91597b9ecf650a63a40753f7f7c771576d252e server: Disable com_tasks(). This server subcommand will break once we terminate the scheduler before calling the command handler. The command was only a debugging aid anyway, and the output was not very interesting to begin with. In particular, it did not include the tasks of the afs process, and always showed the same three tasks (command, vss and status). We keep the subcommand for backward compatibility, but this commit changes it to be a no-op. Scheduled for removal in v0.7.0. --- diff --git a/command.c b/command.c index 43f462fd..837c49cf 100644 --- a/command.c +++ b/command.c @@ -740,12 +740,11 @@ out: } EXPORT_SERVER_CMD_HANDLER(jmp); -static int com_tasks(struct command_context *cc, +/* deprecated, does nothing */ +static int com_tasks(__a_unused struct command_context *cc, __a_unused struct lls_parse_result *lpr) { - char *tl = server_get_tasks(); - assert(tl); - return send_sb(&cc->scc, tl, strlen(tl), SBD_OUTPUT, false); + return 1; } EXPORT_SERVER_CMD_HANDLER(tasks); diff --git a/m4/lls/server_cmd.suite.m4 b/m4/lls/server_cmd.suite.m4 index 2145c516..9378b7c3 100644 --- a/m4/lls/server_cmd.suite.m4 +++ b/m4/lls/server_cmd.suite.m4 @@ -475,11 +475,12 @@ aux_info_prefix = Permissions: [/description] [subcommand tasks] - purpose = list active server tasks + purpose = list active server tasks (deprecated) aux_info = NO_PERMISSION_REQUIRED [description] - For each task, print ID, status and name. This is mostly useful - for debugging. + This used to print the ID, the status and the name of each task, + mainly for debugging purposes. As of version 0.6.2, the subcommand + prints nothing. It will be removed in 0.7.0. Don't use. [/description] [subcommand term]