aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-29 09:37:11 +0200
committerMax Kellermann <max@duempel.org>2008-08-29 09:37:11 +0200
commit8811c0e05943edbcb3d7203ef4f61ec89423718a (patch)
tree666d7e4ecd907f3a7d4c648085ec655efda9aa38 /src/client.c
parent8b1b82b36374e95bcef8195fcd15e4014e73567d (diff)
downloadmpd-8811c0e05943edbcb3d7203ef4f61ec89423718a.tar.gz
mpd-8811c0e05943edbcb3d7203ef4f61ec89423718a.tar.xz
mpd-8811c0e05943edbcb3d7203ef4f61ec89423718a.zip
export the function client_is_expired()
Instead of passing the pointer to the "expired" flag to processListOfCommands(), this function should use the client API to check this flag. We can now remove the "global_expired" hack introduced recently.
Diffstat (limited to '')
-rw-r--r--src/client.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/client.c b/src/client.c
index 7f47aacd4..f09427622 100644
--- a/src/client.c
+++ b/src/client.c
@@ -129,21 +129,17 @@ static void set_send_buf_size(struct client *client)
}
}
-static inline int client_is_expired(const struct client *client)
+int client_is_expired(const struct client *client)
{
return client->fd < 0;
}
-static int global_expired;
-
static inline void client_set_expired(struct client *client)
{
if (client->fd >= 0) {
xclose(client->fd);
client->fd = -1;
}
-
- global_expired = 1;
}
static void client_init(struct client *client, int fd)
@@ -341,11 +337,8 @@ static int client_process_line(struct client *client)
if (strcmp(line, CLIENT_LIST_MODE_END) == 0) {
DEBUG("client %i: process command "
"list\n", client->num);
-
- global_expired = 0;
ret = processListOfCommands(client,
&(client->permission),
- &global_expired,
client->cmd_list_OK,
client->cmd_list);
DEBUG("client %i: process command "