Code auditing weekend results and fixes committing.
[silc.git] / apps / silcd / command_reply.h
index 28d95c5b7c4fa026e3c36a0c4f9a40eef03e0205..62a696e81b5ec341d1b62ae15659f033fa292147 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
 
-  Copyright (C) 1997 - 2000 Pekka Riikonen
+  Copyright (C) 1997 - 2001 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -35,10 +35,12 @@ typedef struct {
   SilcServer server;
   SilcSocketConnection sock;
   SilcCommandPayload payload;
+  SilcArgumentPayload args;
 
   /* If defined this executes the pending command. */
   void *context;
   SilcCommandCb callback;
+  unsigned short ident;
 } *SilcServerCommandReplyContext;
 
 /* Macros */
@@ -51,28 +53,13 @@ typedef struct {
 #define SILC_SERVER_CMD_REPLY_FUNC(func) \
 void silc_server_command_reply_##func(void *context)
 
-/* Macro used to execute command replies */
-#define SILC_SERVER_COMMAND_REPLY_EXEC(ctx)            \
-do {                                                   \
-  SilcServerCommandReply *cmd;                         \
-                                                       \
-  for (cmd = silc_command_reply_list; cmd->cb; cmd++)  \
-    if (cmd->cmd == silc_command_get(ctx->payload)) {  \
-      cmd->cb(ctx);                                    \
-      break;                                           \
-    }                                                  \
-                                                       \
-  if (cmd == NULL) {                                   \
-    silc_free(ctx);                                    \
-    return;                                            \
-  }                                                    \
-} while(0)
-
 /* Prototypes */
 void silc_server_command_reply_process(SilcServer server,
                                       SilcSocketConnection sock,
                                       SilcBuffer buffer);
 SILC_SERVER_CMD_REPLY_FUNC(join);
+SILC_SERVER_CMD_REPLY_FUNC(whois);
 SILC_SERVER_CMD_REPLY_FUNC(identify);
+SILC_SERVER_CMD_REPLY_FUNC(users);
 
 #endif