Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
ed54d5eb
Commit
ed54d5eb
authored
Jan 22, 2017
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-logs'
parents
ce2b4195
84124c31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
src/auth.c
src/auth.c
+39
-1
src/fserve.c
src/fserve.c
+1
-1
No files found.
src/auth.c
View file @
ed54d5eb
...
...
@@ -61,6 +61,42 @@ static unsigned long _next_auth_id(void) {
return
id
;
}
static
const
char
*
auth_result2str
(
auth_result
res
)
{
switch
(
res
)
{
case
AUTH_UNDEFINED
:
return
"undefined"
;
break
;
case
AUTH_OK
:
return
"ok"
;
break
;
case
AUTH_FAILED
:
return
"failed"
;
break
;
case
AUTH_RELEASED
:
return
"released"
;
break
;
case
AUTH_FORBIDDEN
:
return
"forbidden"
;
break
;
case
AUTH_NOMATCH
:
return
"no match"
;
break
;
case
AUTH_USERADDED
:
return
"user added"
;
break
;
case
AUTH_USEREXISTS
:
return
"user exists"
;
break
;
case
AUTH_USERDELETED
:
return
"user deleted"
;
break
;
default:
return
"(unknown)"
;
break
;
}
}
static
auth_client
*
auth_client_setup
(
client_t
*
client
)
{
/* This will look something like "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" */
...
...
@@ -268,6 +304,8 @@ static void __handle_auth_client (auth_t *auth, auth_client *auth_user) {
result
=
AUTH_FAILED
;
}
ICECAST_LOG_DEBUG
(
"client %p on auth %p role %s processed: %s"
,
auth_user
->
client
,
auth
,
auth
->
role
,
auth_result2str
(
result
));
if
(
result
==
AUTH_OK
)
{
if
(
auth_user
->
client
->
acl
)
acl_release
(
auth_user
->
client
->
acl
);
...
...
@@ -355,7 +393,7 @@ static void auth_add_client(auth_t *auth, client_t *client, void (*on_no_match)(
auth_user
->
on_no_match
=
on_no_match
;
auth_user
->
on_result
=
on_result
;
auth_user
->
userdata
=
userdata
;
ICECAST_LOG_INFO
(
"adding client for authentication
"
);
ICECAST_LOG_INFO
(
"adding client
%p
for authentication
on %p"
,
client
,
auth
);
queue_auth_client
(
auth_user
);
}
...
...
src/fserve.c
View file @
ed54d5eb
...
...
@@ -669,7 +669,7 @@ int fserve_add_client (client_t *client, FILE *file)
{
fserve_t
*
fclient
=
calloc
(
1
,
sizeof
(
fserve_t
));
ICECAST_LOG_DEBUG
(
"Adding client to file serving engine"
);
ICECAST_LOG_DEBUG
(
"Adding client
%p
to file serving engine"
,
client
);
if
(
fclient
==
NULL
)
{
client_send_error
(
client
,
404
,
0
,
"memory exhausted"
);
...
...
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