Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
spr0cketeer
Icecast-Server
Commits
197be21d
Commit
197be21d
authored
Nov 08, 2007
by
Karl Heyes
Browse files
only pass clients to url auth handler if the trigger is defined in the xml
svn path=/icecast/trunk/icecast/; revision=14115
parent
66b68170
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/auth_url.c
View file @
197be21d
...
...
@@ -467,35 +467,53 @@ int auth_get_url_auth (auth_t *authenticator, config_options_t *options)
{
auth_url
*
url_info
;
authenticator
->
authenticate
=
url_add_listener
;
authenticator
->
release_listener
=
url_remove_listener
;
authenticator
->
free
=
auth_url_clear
;
authenticator
->
adduser
=
auth_url_adduser
;
authenticator
->
deleteuser
=
auth_url_deleteuser
;
authenticator
->
listuser
=
auth_url_listuser
;
authenticator
->
stream_start
=
url_stream_start
;
authenticator
->
stream_end
=
url_stream_end
;
url_info
=
calloc
(
1
,
sizeof
(
auth_url
));
authenticator
->
state
=
url_info
;
/* default headers */
url_info
->
auth_header
=
strdup
(
"icecast-auth-user: 1
\r\n
"
);
url_info
->
timelimit_header
=
strdup
(
"icecast-auth-timelimit:"
);
while
(
options
)
{
if
(
!
strcmp
(
options
->
name
,
"username"
))
{
free
(
url_info
->
username
);
url_info
->
username
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"password"
))
{
free
(
url_info
->
password
);
url_info
->
password
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"listener_add"
))
{
authenticator
->
authenticate
=
url_add_listener
;
free
(
url_info
->
addurl
);
url_info
->
addurl
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"listener_remove"
))
{
authenticator
->
release_listener
=
url_remove_listener
;
free
(
url_info
->
removeurl
);
url_info
->
removeurl
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"mount_add"
))
{
authenticator
->
stream_start
=
url_stream_start
;
free
(
url_info
->
stream_start
);
url_info
->
stream_start
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"mount_remove"
))
{
authenticator
->
stream_end
=
url_stream_end
;
free
(
url_info
->
stream_end
);
url_info
->
stream_end
=
strdup
(
options
->
value
);
}
if
(
!
strcmp
(
options
->
name
,
"auth_header"
))
{
free
(
url_info
->
auth_header
);
...
...
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