diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 19:16:34 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 19:16:34 +0200 |
commit | 2835e376842facea7b7c145889ac64d413377b6c (patch) | |
tree | 7978f7ef2dca3c3f3524db075fa62f02a3bd84bc /src/client.c | |
parent | bf6994d8e3dde638ced26f4e1ae850422631ee72 (diff) | |
download | mpd-2835e376842facea7b7c145889ac64d413377b6c.tar.gz mpd-2835e376842facea7b7c145889ac64d413377b6c.tar.xz mpd-2835e376842facea7b7c145889ac64d413377b6c.zip |
client: added client_[gs]et_permission()
The code in command.c shouldn't mess with a pointer to
client->permission. Provide an API for accessing this value.
Diffstat (limited to 'src/client.c')
-rw-r--r-- | src/client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c index 714172095..6b3be05d0 100644 --- a/src/client.c +++ b/src/client.c @@ -133,6 +133,16 @@ int client_is_expired(const struct client *client) return client->fd < 0; } +int client_get_permission(const struct client *client) +{ + return client->permission; +} + +void client_set_permission(struct client *client, int permission) +{ + client->permission = permission; +} + static inline void client_set_expired(struct client *client) { if (client->fd >= 0) { |