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
e8546d44
Commit
e8546d44
authored
Dec 17, 2003
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetching the stream list was failing after the config file was re-read.
svn path=/trunk/icecast/; revision=5701
parent
1e7316b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/slave.c
src/slave.c
+10
-9
No files found.
src/slave.c
View file @
e8546d44
...
...
@@ -142,22 +142,16 @@ static void *_slave_thread(void *arg) {
char
*
authheader
,
*
data
;
int
len
;
char
*
username
=
"relay"
;
char
*
password
;
int
max_interval
;
relay_server
*
relay
;
ice_config_t
*
config
;
config
=
config_get_config
();
password
=
config
->
master_password
;
interval
=
max_interval
=
config
->
master_update_interval
;
if
(
password
==
NULL
)
password
=
config
->
source_password
;
config_release_config
();
while
(
_initialized
)
{
if
(
max_interval
>
++
interval
)
{
thread_sleep
(
1000000
);
...
...
@@ -167,21 +161,26 @@ static void *_slave_thread(void *arg) {
/* In case it's been reconfigured */
config
=
config_get_config
();
max_interval
=
config
->
master_update_interval
;
config_release_config
();
interval
=
0
;
}
config
=
config_get_config
();
if
(
config
->
master_server
!=
NULL
)
{
char
*
server
=
config
->
master_server
;
char
*
server
=
strdup
(
config
->
master_server
)
;
int
port
=
config
->
master_server_port
;
char
*
password
=
NULL
;
if
(
config
->
master_password
!=
NULL
)
password
=
strdup
(
config
->
master_password
);
else
password
=
strdup
(
config
->
source_password
);
config_release_config
();
mastersock
=
sock_connect_wto
(
server
,
port
,
0
);
if
(
mastersock
==
SOCK_ERROR
)
{
WARN0
(
"Relay slave failed to contact master server to fetch stream list"
);
free
(
server
);
free
(
password
);
continue
;
}
...
...
@@ -212,6 +211,8 @@ static void *_slave_thread(void *arg) {
else
avl_tree_unlock
(
global
.
source_tree
);
}
free
(
server
);
free
(
password
);
sock_close
(
mastersock
);
}
else
{
...
...
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