server: Remove unused ->peer from struct command_context.
[paraslash.git] / command.c
index 3943d6dce76ad83ba0eed281e9756d8f58904e6e..077c159d571240815072a34c426f230f21a0c897 100644 (file)
--- a/command.c
+++ b/command.c
@@ -227,7 +227,7 @@ static int check_sender_args(struct command_context *cc,
                struct lls_parse_result *lpr, struct sender_command_data *scd)
 {
        int i, ret;
-       const char *subcmds[] = {SENDER_SUBCOMMANDS};
+       const char * const subcmds[] = {SENDER_SUBCOMMANDS};
        const char *arg;
        char *errctx;
        unsigned num_inputs = lls_num_inputs(lpr);
@@ -457,10 +457,9 @@ EXPORT_SERVER_CMD_HANDLER(version);
        ITEM(NUM_CHUNKS) \
        ITEM(AMPLIFICATION) \
 
-/**
- * Write a list of audio-file related status items with empty values.
- *
- * This is used by vss when currently no audio file is open.
+/*
+ * Create a set of audio-file related status items with empty values. These are
+ * written to stat clients when no audio file is open.
  */
 static unsigned empty_status_items(bool parser_friendly, char **result)
 {
@@ -893,7 +892,7 @@ __noreturn void handle_connect(int fd, const char *peername)
        unsigned char challenge_hash[HASH_SIZE];
        char *command = NULL, *buf = para_malloc(HANDSHAKE_BUFSIZE) /* must be on the heap */;
        size_t numbytes;
-       struct command_context cc_struct = {.peer = peername}, *cc = &cc_struct;
+       struct command_context cc_struct = {.u = NULL}, *cc = &cc_struct;
        struct iovec iov;
        struct connection_features cf;