]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod_command.c
server: Remove command pointer from struct command_context.
[paraslash.git] / audiod_command.c
index 98dba3b32dfcaee1a7532d8e3021947102d98f89..0fe2e5f05edd39e18ed8aac3d0191daec9196026 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "para.h"
 #include "audiod.cmdline.h"
+#include "audiod.command_list.h"
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
 #include "write.h"
 #include "fd.h"
 #include "version.h"
-#include "audiod.command_list.h"
 
 extern struct sched sched;
 extern char *stat_item_values[NUM_STAT_ITEMS];
 
+/* Defines one command of para_audiod. */
+struct audiod_command {
+       const char *name;
+       /* Pointer to the function that handles the command. */
+       int (*handler)(int, int, char **);
+       /* One-line description. */
+       const char *description;
+       /* Summary of the command line options. */
+       const char *usage;
+       /* The long help text. */
+       const char *help;
+};
 
 static struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
 
@@ -278,6 +290,7 @@ static int com_tasks(int fd, __a_unused int argc, __a_unused char **argv)
 {
        char *tl = get_task_list(&sched);
        int ret = 1;
+
        if (tl)
                ret = client_write(fd, tl);
        free(tl);