Commit 1ce5f4d7 authored by Max Kellermann's avatar Max Kellermann

command: use client_[gs]et_permission()

Don't pass a pointer to client->permission to processCommand(), better let the code in command.c use the new permission getter/setter functions.
parent 2835e376
...@@ -337,7 +337,6 @@ static int client_process_line(struct client *client) ...@@ -337,7 +337,6 @@ static int client_process_line(struct client *client)
DEBUG("client %i: process command " DEBUG("client %i: process command "
"list\n", client->num); "list\n", client->num);
ret = processListOfCommands(client, ret = processListOfCommands(client,
&(client->permission),
client->cmd_list_OK, client->cmd_list_OK,
client->cmd_list); client->cmd_list);
DEBUG("client %i: process command " DEBUG("client %i: process command "
...@@ -384,8 +383,7 @@ static int client_process_line(struct client *client) ...@@ -384,8 +383,7 @@ static int client_process_line(struct client *client)
} else { } else {
DEBUG("client %i: process command \"%s\"\n", DEBUG("client %i: process command \"%s\"\n",
client->num, line); client->num, line);
ret = processCommand(client, ret = processCommand(client, line);
&(client->permission), line);
DEBUG("client %i: command returned %i\n", DEBUG("client %i: command returned %i\n",
client->num, ret); client->num, ret);
......
...@@ -29,11 +29,10 @@ ...@@ -29,11 +29,10 @@
struct client; struct client;
int processListOfCommands(struct client *client, int *permission, int processListOfCommands(struct client *client,
int listOK, struct strnode *list); int listOK, struct strnode *list);
int processCommand(struct client *client, int processCommand(struct client *client, char *commandString);
int *permission, char *commandString);
void initCommands(void); void initCommands(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment