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
1d66e714
Commit
1d66e714
authored
Feb 13, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: add function client_is_local()
parent
d98a863b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
client.h
src/client.h
+11
-0
command.c
src/command.c
+1
-1
No files found.
src/client.h
View file @
1d66e714
...
...
@@ -45,6 +45,17 @@ bool client_is_expired(const struct client *client);
G_GNUC_PURE
int
client_get_uid
(
const
struct
client
*
client
);
/**
* Is this client running on the same machine, connected with a local
* (UNIX domain) socket?
*/
G_GNUC_PURE
static
inline
bool
client_is_local
(
const
struct
client
*
client
)
{
return
client_get_uid
(
client
)
>
0
;
}
G_GNUC_PURE
unsigned
client_get_permission
(
const
struct
client
*
client
);
...
...
src/command.c
View file @
1d66e714
...
...
@@ -451,7 +451,7 @@ static enum command_return
handle_urlhandlers
(
struct
client
*
client
,
G_GNUC_UNUSED
int
argc
,
G_GNUC_UNUSED
char
*
argv
[])
{
if
(
client_
get_uid
(
client
)
>
0
)
if
(
client_
is_local
(
client
)
)
client_puts
(
client
,
"handler: file://
\n
"
);
print_supported_uri_schemes
(
client
);
return
COMMAND_RETURN_OK
;
...
...
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