client: pass the client struct to processCommand()
Start exporting the client struct as an opaque struct. For now, pass it only to processCommand() and processListOfCommands(), and provide a function to extract the socket handle. Later, we will propagate the pointer to all command implementations, and of course to client_print() etc.
This commit is contained in:
@@ -27,10 +27,14 @@
|
||||
#define COMMAND_RETURN_CLOSE 20
|
||||
#define COMMAND_MASTER_READY 30
|
||||
|
||||
int processListOfCommands(int fd, int *permission, int *expired,
|
||||
struct client;
|
||||
|
||||
int processListOfCommands(struct client *client,
|
||||
int *permission, int *expired,
|
||||
int listOK, struct strnode *list);
|
||||
|
||||
int processCommand(int fd, int *permission, char *commandString);
|
||||
int processCommand(struct client *client,
|
||||
int *permission, char *commandString);
|
||||
|
||||
void initCommands(void);
|
||||
|
||||
|
Reference in New Issue
Block a user