]> git.tue.mpg.de Git - paraslash.git/commitdiff
server: Remove unused ->peer from struct command_context.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 Aug 2017 20:40:05 +0000 (22:40 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 8 Aug 2017 09:50:55 +0000 (11:50 +0200)
It is initialized in handle_connect() but never used.

command.c
command.h

index 0b06e5c00d852206df6971d52c8d06c2e357d99e..077c159d571240815072a34c426f230f21a0c897 100644 (file)
--- a/command.c
+++ b/command.c
@@ -892,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;
 
index 5b01eb79e3500f34d135d1bdc8db6ac8ec4ad59c..0265f056d999ff1322b639493ad5503bc847dd6e 100644 (file)
--- a/command.h
+++ b/command.h
@@ -2,8 +2,6 @@
 
 /** Per connection data available to command handlers. */
 struct command_context {
-       /** Network address of the peer. */
-       const char *peer;
        /** The paraslash user that executes this command. */
        struct user *u;
        /** File descriptor and crypto keys. */