[xiph-commits] r8121 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Wed Oct 27 07:05:15 PDT 2004
Author: karl
Date: 2004-10-27 07:05:14 -0700 (Wed, 27 Oct 2004)
New Revision: 8121
Modified:
icecast/branches/kh/icecast/src/format.h
icecast/branches/kh/icecast/src/fserve.c
icecast/branches/kh/icecast/src/slave.c
icecast/branches/kh/icecast/src/source.c
icecast/branches/kh/icecast/src/stats.c
Log:
small volatile and resync cleanups
Modified: icecast/branches/kh/icecast/src/format.h
===================================================================
--- icecast/branches/kh/icecast/src/format.h 2004-10-27 13:15:53 UTC (rev 8120)
+++ icecast/branches/kh/icecast/src/format.h 2004-10-27 14:05:14 UTC (rev 8121)
@@ -42,10 +42,6 @@
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);
Modified: icecast/branches/kh/icecast/src/fserve.c
===================================================================
--- icecast/branches/kh/icecast/src/fserve.c 2004-10-27 13:15:53 UTC (rev 8120)
+++ icecast/branches/kh/icecast/src/fserve.c 2004-10-27 14:05:14 UTC (rev 8121)
@@ -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;
Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c 2004-10-27 13:15:53 UTC (rev 8120)
+++ icecast/branches/kh/icecast/src/slave.c 2004-10-27 14:05:14 UTC (rev 8121)
@@ -128,6 +128,7 @@
thread_rwlock_create (&slaves_lock);
slave_running = 1;
+ max_interval = 0;
_slave_thread_id = thread_create("Slave Thread", _slave_thread, NULL, THREAD_ATTACHED);
}
Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c 2004-10-27 13:15:53 UTC (rev 8120)
+++ icecast/branches/kh/icecast/src/source.c 2004-10-27 14:05:14 UTC (rev 8121)
@@ -1075,14 +1075,12 @@
/* 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 @@
}
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)
{
Modified: icecast/branches/kh/icecast/src/stats.c
===================================================================
--- icecast/branches/kh/icecast/src/stats.c 2004-10-27 13:15:53 UTC (rev 8120)
+++ icecast/branches/kh/icecast/src/stats.c 2004-10-27 14:05:14 UTC (rev 8121)
@@ -58,17 +58,17 @@
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 @@
event = _get_event_from_queue(&queue);
- while (event) {
+ while (event)
+ {
if (event->hidden == 0)
{
xmlChar *name, *value;
More information about the commits
mailing list