Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2835e376
Commit
2835e376
authored
Sep 07, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
bf6994d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
client.c
src/client.c
+10
-0
client.h
src/client.h
+4
-0
No files found.
src/client.c
View file @
2835e376
...
...
@@ -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
)
{
...
...
src/client.h
View file @
2835e376
...
...
@@ -33,6 +33,10 @@ void client_new(int fd, const struct sockaddr *addr);
int
client_is_expired
(
const
struct
client
*
client
);
int
client_get_permission
(
const
struct
client
*
client
);
void
client_set_permission
(
struct
client
*
client
,
int
permission
);
/**
* Write a block of data to the client.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment