Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
14b28dd8
Commit
14b28dd8
authored
Aug 17, 2002
by
Michael Smith
Browse files
Fall back to using the source-password if no master-password is set.
svn path=/trunk/icecast/; revision=3849
parent
d54dccb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/slave.c
View file @
14b28dd8
...
...
@@ -75,6 +75,11 @@ static void *_slave_thread(void *arg) {
char
*
authheader
,
*
data
;
int
len
;
char
*
username
=
"relay"
;
char
*
password
=
config_get_config
()
->
master_password
;
if
(
password
==
NULL
)
password
=
config_get_config
()
->
source_password
;
while
(
_initialized
)
{
if
(
config_get_config
()
->
master_update_interval
>
++
interval
)
{
...
...
@@ -90,11 +95,11 @@ static void *_slave_thread(void *arg) {
continue
;
}
len
=
strlen
(
username
)
+
strlen
(
config_get_config
()
->
master_
password
)
+
1
;
len
=
strlen
(
username
)
+
strlen
(
password
)
+
1
;
authheader
=
malloc
(
len
+
1
);
strcpy
(
authheader
,
username
);
strcat
(
authheader
,
":"
);
strcat
(
authheader
,
config_get_config
()
->
master_
password
);
strcat
(
authheader
,
password
);
data
=
util_base64_encode
(
authheader
);
sock_write
(
mastersock
,
"GET /allstreams.txt HTTP/1.0
\r\n
Authorization: Basic %s
\r\n\r\n
"
,
data
);
free
(
data
);
...
...
Write
Preview
Supports
Markdown
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