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)
DEBUG("client %i: process command "
"list\n", client->num);
ret = processListOfCommands(client,
&(client->permission),
client->cmd_list_OK,
client->cmd_list);
DEBUG("client %i: process command "
......@@ -384,8 +383,7 @@ static int client_process_line(struct client *client)
} else {
DEBUG("client %i: process command \"%s\"\n",
client->num, line);
ret = processCommand(client,
&(client->permission), line);
ret = processCommand(client, line);
DEBUG("client %i: command returned %i\n",
client->num, ret);
......
......@@ -29,11 +29,10 @@
struct client;
int processListOfCommands(struct client *client, int *permission,
int processListOfCommands(struct client *client,
int listOK, struct strnode *list);
int processCommand(struct client *client,
int *permission, char *commandString);
int processCommand(struct client *client, char *commandString);
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