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
b24028f6
Commit
b24028f6
authored
Feb 02, 2004
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recheck the relays after the HUP has been handled
svn path=/trunk/icecast/; revision=5807
parent
c95f2cea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
src/event.c
src/event.c
+2
-0
src/slave.c
src/slave.c
+10
-9
src/slave.h
src/slave.h
+1
-0
No files found.
src/event.c
View file @
b24028f6
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "refbuf.h"
#include "refbuf.h"
#include "client.h"
#include "client.h"
#include "logging.h"
#include "logging.h"
#include "slave.h"
#define CATMODULE "event"
#define CATMODULE "event"
...
@@ -57,6 +58,7 @@ void event_config_read(void *arg)
...
@@ -57,6 +58,7 @@ void event_config_read(void *arg)
config_clear
(
config
);
config_clear
(
config
);
config_set_config
(
&
new_config
);
config_set_config
(
&
new_config
);
restart_logging
();
restart_logging
();
slave_recheck
();
yp_recheck_config
(
config
);
yp_recheck_config
(
config
);
config_release_config
();
config_release_config
();
...
...
src/slave.c
View file @
b24028f6
...
@@ -62,6 +62,14 @@
...
@@ -62,6 +62,14 @@
static
void
*
_slave_thread
(
void
*
arg
);
static
void
*
_slave_thread
(
void
*
arg
);
thread_type
*
_slave_thread_id
;
thread_type
*
_slave_thread_id
;
static
int
_initialized
=
0
;
static
int
_initialized
=
0
;
static
unsigned
max_interval
=
0
;
void
slave_recheck
(
void
)
{
max_interval
=
0
;
}
void
slave_initialize
(
void
)
{
void
slave_initialize
(
void
)
{
ice_config_t
*
config
;
ice_config_t
*
config
;
...
@@ -150,19 +158,12 @@ static void create_relay_stream(char *server, int port,
...
@@ -150,19 +158,12 @@ static void create_relay_stream(char *server, int port,
static
void
*
_slave_thread
(
void
*
arg
)
{
static
void
*
_slave_thread
(
void
*
arg
)
{
sock_t
mastersock
;
sock_t
mastersock
;
char
buf
[
256
];
char
buf
[
256
];
int
interval
;
unsigned
interval
=
0
;
char
*
authheader
,
*
data
;
char
*
authheader
,
*
data
;
int
len
;
int
len
;
char
*
username
=
"relay"
;
char
*
username
=
"relay"
;
int
max_interval
;
relay_server
*
relay
;
relay_server
*
relay
;
ice_config_t
*
config
;
ice_config_t
*
config
;
config
=
config_get_config
();
interval
=
max_interval
=
config
->
master_update_interval
;
config_release_config
();
while
(
_initialized
)
{
while
(
_initialized
)
{
if
(
max_interval
>
++
interval
)
{
if
(
max_interval
>
++
interval
)
{
...
@@ -252,7 +253,7 @@ static void *_slave_thread(void *arg) {
...
@@ -252,7 +253,7 @@ static void *_slave_thread(void *arg) {
thread_mutex_unlock
(
&
(
config_locks
()
->
relay_lock
));
thread_mutex_unlock
(
&
(
config_locks
()
->
relay_lock
));
}
}
thread_exit
(
0
);
INFO0
(
"Slave thread shutting down"
);
return
NULL
;
return
NULL
;
}
}
src/slave.h
View file @
b24028f6
...
@@ -15,5 +15,6 @@
...
@@ -15,5 +15,6 @@
void
slave_initialize
(
void
);
void
slave_initialize
(
void
);
void
slave_shutdown
(
void
);
void
slave_shutdown
(
void
);
void
slave_recheck
(
void
);
#endif
/* __SLAVE_H__ */
#endif
/* __SLAVE_H__ */
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