mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
small volatile and resync cleanups
svn path=/icecast/branches/kh/icecast/; revision=8121
This commit is contained in:
parent
f83a70568d
commit
3dfcdaf3cd
@ -42,10 +42,6 @@ typedef struct _format_plugin_tag
|
||||
|
||||
char *format_description;
|
||||
|
||||
/* set this is the data format has a header that
|
||||
** we must send before regular data
|
||||
*/
|
||||
|
||||
refbuf_t *(*get_buffer)(struct source_tag *);
|
||||
int (*write_buf_to_client)(struct _format_plugin_tag *format, client_t *client);
|
||||
void (*write_buf_to_file)(struct source_tag *source, refbuf_t *refbuf);
|
||||
|
@ -61,7 +61,7 @@
|
||||
#endif
|
||||
|
||||
static fserve_t *active_list = NULL;
|
||||
static volatile fserve_t *pending_list = NULL;
|
||||
volatile static fserve_t *pending_list = NULL;
|
||||
static mutex_t pending_lock;
|
||||
static avl_tree *mimetypes = NULL;
|
||||
|
||||
|
@ -128,6 +128,7 @@ void slave_initialize(void)
|
||||
|
||||
thread_rwlock_create (&slaves_lock);
|
||||
slave_running = 1;
|
||||
max_interval = 0;
|
||||
_slave_thread_id = thread_create("Slave Thread", _slave_thread, NULL, THREAD_ATTACHED);
|
||||
}
|
||||
|
||||
|
@ -1075,14 +1075,12 @@ static void source_shutdown (source_t *source)
|
||||
|
||||
/* delete this sources stats */
|
||||
stats_event_dec (NULL, "sources");
|
||||
stats_event(source->mount, NULL, NULL);
|
||||
|
||||
/* we don't remove the source from the tree here, it may be a relay and
|
||||
therefore reserved */
|
||||
source_clear_source (source);
|
||||
|
||||
/* remove source stats */
|
||||
stats_event (source->mount, NULL, NULL);
|
||||
|
||||
thread_mutex_unlock (&source->lock);
|
||||
|
||||
global_lock();
|
||||
@ -1146,10 +1144,10 @@ static void _parse_audio_info (source_t *source, const char *s)
|
||||
}
|
||||
if (len)
|
||||
{
|
||||
char name[200], value[200];
|
||||
char name[100], value[200];
|
||||
char *esc;
|
||||
|
||||
sscanf (start, "%199[^=]=%199[^;\r\n]", name, value);
|
||||
sscanf (start, "%99[^=]=%199[^;\r\n]", name, value);
|
||||
esc = util_url_unescape (value);
|
||||
if (esc)
|
||||
{
|
||||
|
11
src/stats.c
11
src/stats.c
@ -58,17 +58,17 @@ typedef struct _event_listener_tag
|
||||
struct _event_listener_tag *next;
|
||||
} event_listener_t;
|
||||
|
||||
static volatile int _stats_running = 0;
|
||||
volatile static int _stats_running = 0;
|
||||
static thread_type *_stats_thread_id;
|
||||
static volatile int _stats_threads = 0;
|
||||
volatile static int _stats_threads = 0;
|
||||
|
||||
static stats_t _stats;
|
||||
static mutex_t _stats_mutex;
|
||||
|
||||
static volatile stats_event_t *_global_event_queue;
|
||||
volatile static stats_event_t *_global_event_queue;
|
||||
mutex_t _global_event_mutex;
|
||||
|
||||
static volatile event_listener_t *_event_listeners;
|
||||
volatile static event_listener_t *_event_listeners;
|
||||
|
||||
|
||||
static void *_stats_thread(void *arg);
|
||||
@ -867,7 +867,8 @@ void stats_get_xml(xmlDocPtr *doc)
|
||||
|
||||
|
||||
event = _get_event_from_queue(&queue);
|
||||
while (event) {
|
||||
while (event)
|
||||
{
|
||||
if (event->hidden == 0)
|
||||
{
|
||||
xmlChar *name, *value;
|
||||
|
Loading…
Reference in New Issue
Block a user